mthmulders commented on code in PR #816: URL: https://github.com/apache/maven/pull/816#discussion_r1038097778
########## maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java: ########## @@ -194,15 +162,30 @@ public Map<String, String> getProjectProperties() { } public DefaultProfileActivationContext setProjectProperties(Properties projectProperties) { - if (projectProperties != null) { - this.projectProperties = projectProperties.entrySet().stream() - .collect(collectingAndThen( - toMap(k -> String.valueOf(k.getKey()), v -> String.valueOf(v)), - Collections::unmodifiableMap)); - } else { - this.projectProperties = Collections.emptyMap(); - } + return setProjectProperties(toMap(projectProperties)); + } + + public DefaultProfileActivationContext setProjectProperties(Map<String, String> projectProperties) { + this.projectProperties = unmodifiable(projectProperties); Review Comment: Ah, I see, we now have *two* methods named `setProjectProperties`. The `null` guarding is now split over those two methods, where it was previously in one method. -- 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. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org