rikkarth commented on code in PR #412:
URL: 
https://github.com/apache/commons-configuration/pull/412#discussion_r1586340357


##########
src/main/java/org/apache/commons/configuration2/web/BaseWebConfiguration.java:
##########
@@ -68,6 +69,26 @@ protected boolean containsKeyInternal(final String key) {
         return getPropertyInternal(key) != null;
     }
 
+    @Override
+    protected boolean containsValueInternal(final String value) {
+        return contains(getKeys(), value);
+    }
+
+    private boolean contains(Iterator<String> keys, final String value) {
+        if (keys.hasNext()) {
+            String nextKey = keys.next();
+            Object valueFromKey = getProperty(nextKey);
+
+            if (valueFromKey.equals(value)) {
+                return true;
+            }
+
+            contains(keys, value);
+        }
+
+        return false;
+    }

Review Comment:
   They do, I reduced the duplication in my next commit.



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