nfalco79 commented on a change in pull request #56:
URL: https://github.com/apache/maven-release/pull/56#discussion_r427295559
##########
File path:
maven-release-manager/src/main/java/org/apache/maven/shared/release/config/ReleaseDescriptorBuilder.java
##########
@@ -58,7 +59,9 @@ public ReleaseDescriptorBuilder addCheckModificationExclude(
String string )
public ReleaseDescriptorBuilder setActivateProfiles( List<String> profiles
)
{
- releaseDescriptor.setActivateProfiles( profiles );
+ List<String> copy = new ArrayList<>();
+ copy.addAll( profiles );
Review comment:
@bguerin I confirm that the fix works.
I would also suggest to change the test case
[here](https://github.com/apache/maven-release/blob/3efc9993aae247cff8e2c7dcd97113a7ef3e69d0/maven-release-manager/src/test/java/org/apache/maven/shared/release/DefaultReleaseManagerTest.java#L728)
and use the same approach at [few lines
above](https://github.com/apache/maven-release/blob/3efc9993aae247cff8e2c7dcd97113a7ef3e69d0/maven-release-manager/src/test/java/org/apache/maven/shared/release/DefaultReleaseManagerTest.java#L721).
In short replace:
`secondBuilder.setActivateProfiles( new ArrayList( Arrays.asList("aProfile",
"bProfile") ) );`
with
`secondBuilder.setActivateProfiles( Arrays.asList( Arrays.asList("aProfile",
"bProfile") ) );`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]