rikkarth commented on PR #412:
URL:
https://github.com/apache/commons-configuration/pull/412#issuecomment-2088800417
> @rikkarth You need to understand how to not break binary compatibility:
Please see "13.5.6. Interface Method Declarations" in the JLS at the link I've
already provided.
Thank you so much for pointing me in the right direction. First time
contributing to a project with this specification, but after reading all this
it makes a lot of sense.
I would like to ask if you don't mind looking at my default implementation.
I think if this method is not implemented by the Class implementing
ImmutableConfiguration, the caller should get an Exception with this message.
Or should it just return false?
```java
/**
* Returns true if this configuration contains one or more keys to this
value. This operation is 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()));
}
```
--
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]