ctubbsii commented on a change in pull request #2186:
URL: https://github.com/apache/accumulo/pull/2186#discussion_r662645036



##########
File path: core/src/main/java/org/apache/accumulo/core/conf/Property.java
##########
@@ -1525,24 +1541,20 @@ public static boolean isClassProperty(String key) {
   }
 
   static {
+

Review comment:
       LOL, I think you removed the other blank line, but then added this one. 
It must be the IDE. It's fine either way. I just think it's funny.

##########
File path: core/src/main/java/org/apache/accumulo/core/conf/Property.java
##########
@@ -1525,24 +1541,20 @@ public static boolean isClassProperty(String key) {
   }
 
   static {
+
     // Precomputing information here avoids :
     // * Computing it each time a method is called
     // * Using synch to compute the first time a method is called
-    propertiesByKey = new HashMap<>();
-    validPrefixes = new HashSet<>();
-    validProperties = new HashSet<>();
 
     for (Property p : Property.values()) {
+      propertiesByKey.put(p.getKey(), p);
       if (p.getType().equals(PropertyType.PREFIX)) {
         validPrefixes.add(p.getKey());
       } else {
         validProperties.add(p.getKey());
       }
-      propertiesByKey.put(p.getKey(), p);
-    }
-
-    validTableProperties = new HashSet<>();
-    for (Property p : Property.values()) {
+      // exclude prefix types (avoids being able to set things like 
table.custom or
+      // table.constraint)

Review comment:
       Minor wording clarification (especially using "prevents" rather than 
"avoids" to make it clear it's important for blocking the behavior we don't 
want, and why).
   ```suggestion
         // exclude prefix types (prevents setting a prefix type, like 
table.custom or
         // table.constraint, directly, since they aren't valid properties on 
their own)
   ```




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


Reply via email to