Skip to content

Commit

Permalink
Correct handling for embedded properties and plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
rnc committed Oct 2, 2024
1 parent dfa9438 commit c101817
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ private static PropertyUpdate internalUpdateProperty( ManipulationSession sessio
// >${foo}value<
// We don't attempt to recursively resolve those as tracking the split of the variables, combined
// with the update and strict version checking becomes overly fragile.
if ( ignoreStrict )
{
throw new ManipulationException(
"NYI : handling for versions with explicit overrides ({}) with multiple embedded properties is NYI. ",
oldValue );
}
if ( resolvedValue.equals( newValue ) )
{
logger.warn( "Nothing to update as original key {} value matches new value {}", key, newValue );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@ public void testUpdateNestedProperties4() throws Exception
"3.18.2.redhat-00003" ),
PropertiesUtils.PropertyUpdate.FOUND );
assertEquals( "${camel.major.minor}.2.redhat-00003",
pP.getModel().getProperties().getProperty( "camel.version" ) );

assertSame( updateProperties( session, pP, true, "camel.version",
"3.18.2.redhat-00004" ),
PropertiesUtils.PropertyUpdate.FOUND );
assertEquals( "${camel.major.minor}.2.redhat-00004",
pP.getModel().getProperties().getProperty( "camel.version" ) );

assertSame( updateProperties( session, pP, false, "camel.version.2",
Expand Down

0 comments on commit c101817

Please sign in to comment.