You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/08/11 16:31:42 UTC

[GitHub] [accumulo] EdColeman commented on a diff in pull request #2864: Revert recent configuration commits, implement differently

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


##########
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:
   Would be nice to have a test for this that would fail before any changes



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org