Skip to content

Commit

Permalink
[MNG-6114] Elements from the global settings should be ordered before…
Browse files Browse the repository at this point in the history
… elements from the user settings

This closes apache#142 and closes apache#418
  • Loading branch information
ChristianSchulte authored and michael-o committed Feb 28, 2021
1 parent d740200 commit b23116d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,19 @@ private static <T extends IdentifiableBase> void shallowMergeById( List<T> domin
String recessiveSourceLevel )
{
Map<String, T> dominantById = mapById( dominant );
final List<T> identifiables = new ArrayList<>( recessive.size() );

for ( T identifiable : recessive )
{
if ( !dominantById.containsKey( identifiable.getId() ) )
{
identifiable.setSourceLevel( recessiveSourceLevel );

dominant.add( identifiable );
identifiables.add( identifiable );
}
}

dominant.addAll( 0, identifiables );
}

/**
Expand Down

0 comments on commit b23116d

Please sign in to comment.