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/12 11:35:47 UTC
[GitHub] [accumulo] dlmarion commented on a diff in pull request #2876: Fix AccumuloConfiguration.get(String) to get Property by key
dlmarion commented on code in PR #2876:
URL: https://github.com/apache/accumulo/pull/2876#discussion_r944377728
##########
core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java:
##########
@@ -80,10 +80,10 @@ private static class PrefixProps {
* @return property value
*/
public String get(String property) {
- try {
- return get(Property.valueOf(property));
- } catch (IllegalArgumentException e) {
- // Could be a client or custom property, fall back to filtering
+ Property p = Property.getPropertyByKey(property);
+ if (p != null) {
+ return get(p);
+ } else {
Review Comment:
Yeah, but I think at first glance it's easier to read this way.
--
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