ctubbsii commented on code in PR #2864:
URL: https://github.com/apache/accumulo/pull/2864#discussion_r943665707


##########
core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java:
##########
@@ -71,18 +72,22 @@ private static class PrefixProps {
    * Gets a property value from this configuration.
    *
    * <p>
-   * Note: this is inefficient, but convenient on occasion. For retrieving 
multiple properties, use
-   * {@link #getProperties(Map, String...)} if the property names are known or
-   * {@link #getProperties(Map, Predicate)} with a custom filter.
+   * Note: this is inefficient for values that are not a {@link Property}. For 
retrieving multiple
+   * properties, use {@link #getProperties(Map, Predicate)} with a custom 
filter.
    *
    * @param property
    *          property to get
    * @return property value
    */
   public String get(String property) {
-    Map<String,String> propMap = new HashMap<>(1);
-    getProperties(propMap, property);
-    return propMap.get(property);
+    try {
+      return get(Property.valueOf(property));

Review Comment:
   The try portion of this block is always going to throw, because we would 
only ever call it with the property key, which is never going to be the same as 
the enum key, which is what `.valueOf` is trying to look up.



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