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 2018/12/05 15:42:46 UTC

[GitHub] mikewalch commented on a change in pull request #795: Unit test and validation for client properties

mikewalch commented on a change in pull request #795: Unit test and validation for client properties
URL: https://github.com/apache/accumulo/pull/795#discussion_r239118399
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
 ##########
 @@ -302,4 +302,44 @@ public static void setAuthenticationToken(Properties properties, AuthenticationT
     properties.setProperty(ClientProperty.AUTH_TYPE.getKey(), token.getClass().getName());
     properties.setProperty(ClientProperty.AUTH_TOKEN.getKey(), encodeToken(token));
   }
+
+  public static boolean isPropertySet(Properties properties, ClientProperty prop) {
+    return properties.containsKey(prop.getKey()) && !prop.getValue(properties).isEmpty();
+  }
+
+  /**
+   * @return True if Properties contains all required properties
+   */
+  public static boolean hasRequired(Properties properties) {
 
 Review comment:
   It is. I'll remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services