DomGarguilo commented on code in PR #2965:
URL: https://github.com/apache/accumulo/pull/2965#discussion_r997091652
##########
core/src/test/java/org/apache/accumulo/core/clientImpl/TableOperationsHelperTest.java:
##########
@@ -133,22 +133,18 @@ public void flush(String tableName, Text start, Text end,
boolean wait) {}
@Override
public void setProperty(String tableName, String property, String value) {
- if (!settings.containsKey(tableName))
- settings.put(tableName, new TreeMap<>());
+ settings.putIfAbsent(tableName, new TreeMap<>());
settings.get(tableName).put(property, value);
}
@Override
public Map<String,String> modifyProperties(String tableName,
Consumer<Map<String,String>> mapMutator)
throws IllegalArgumentException, ConcurrentModificationException {
+ settings.putIfAbsent(tableName, new TreeMap<>());
Review Comment:
Oh cool, I did not know that, thanks!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]