Skip to content

fix(core): Wildcard transformation exceptions#623

Open
Fritx22 wants to merge 1 commit into
SpongePowered:trunkfrom
Fritx22:fix/wildcard-transformation-exceptions
Open

fix(core): Wildcard transformation exceptions#623
Fritx22 wants to merge 1 commit into
SpongePowered:trunkfrom
Fritx22:fix/wildcard-transformation-exceptions

Conversation

@Fritx22

@Fritx22 Fritx22 commented Jul 17, 2026

Copy link
Copy Markdown

When applying a transformation to a wildcard path in SingleConfigurationTransformation the ConfigurateException exceptions are caught but are never thrown again after processing all the children nodes. Therefore, this bug prevents the action from purposefully aborting a transformation or automatically aborting the transformation when an unexpected exception is thrown. This will result in a "successful" transformation but the configuration will be partially upgraded.

Unlike in this case, transformations applied to non-wildcard paths throw the exceptions as expected.

This pull request fixes this issue and adds tests covering all ConfigurateException exceptions that can be thrown while processing a transformation, including the suppressed exceptions.

The tests testSingleTransformationWildcardMapThrowsConfigurateException() and testSingleTransformationWildcardListThrowsConfigurateException() fail without the fix. After applying the fix and building the project all tests and checkstyle checks pass.

* Fix SingleConfigurationTransformation not throwing
ConfigurateException exceptions when applying an action
to a wildcard path, unlike when applying it to paths
without wildcard

* Add tests covering all ConfigurateException exceptions
thrown while processing a transformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant