keith-turner commented on a change in pull request #1196: Update Accumulo to 
build and run with Java 11
URL: https://github.com/apache/accumulo/pull/1196#discussion_r292988144
 
 

 ##########
 File path: 
core/src/main/java/org/apache/accumulo/core/client/summary/SummarizerConfiguration.java
 ##########
 @@ -274,7 +274,8 @@ public Builder addOptions(Map<String,String> options) {
     }
 
     public SummarizerConfiguration build() {
-      return new SummarizerConfiguration(className, configId, 
imBuilder.build());
+      return new SummarizerConfiguration(className, configId,
+          Collections.unmodifiableMap(imBuilder));
 
 Review comment:
   This does not have the same behavior.  If someone calls addOption on the 
builder after calling build it would modify the map.   Could set imBuilder to 
null to prevent future use.  Or could call Map.copyOf

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to