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


##########
src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java:
##########
@@ -62,6 +62,20 @@ public interface ImmutableConfiguration {
      */
     boolean containsKey(String key);
 
+    /**
+     * Returns true if this configuration contains one or more matches to this 
value. This operation stops at first
+     * match but may be more expensive than the {@link #containsKey 
containsKey} method.
+     *
+     * @param value value whose presence in this configuration is to be tested
+     * @return {@code true} if this configuration maps one or more keys to the 
specified value
+     * @throws NullPointerException          if the value is {@code null}
+     * @throws UnsupportedOperationException if this method is not supported 
by the implementing class.
+     */
+    default boolean containsValue(String value) {
+        throw new UnsupportedOperationException(
+            String.format("Class %s does not support this method.", 
this.getClass()));

Review Comment:
   Hey Greg, you are right
   
   I did in fact not test this method since I couldn't think of a way to test 
this in a class that doesn't implement the method without creating a dummy 
class for it.
   
   Do you think I should just adapt the message like you suggested?
   
   Thank you.



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