You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/08/27 14:41:23 UTC
DO NOT REPLY [Bug 30893] New: -
Javadoc for Configuration.subset(String prefix) is misleading
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30893>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30893
Javadoc for Configuration.subset(String prefix) is misleading
Summary: Javadoc for Configuration.subset(String prefix) is
misleading
Product: Commons
Version: 1.0 Alpha
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Other
Component: Configuration
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: glissmann@protosoft.de
Hi there,
the Javadoc for the method "public Configuration subset(String prefix)"
in the Interface "Configuration" is somewhat misleading.
It reads: "Return a decorator Configuration containing every key from the
current Configuration that starts with the specified prefix."
Now, if the current Configuration does not contain any keys that start with the
specified prefix, Configuration.subset does not return an empty Configuration
object (which could then be tested with .isEmpty whether it contains keys at
all), but null (which leads to a nice NullPointerException if you try to run
.isEmpty on it.. ;-)
Can you please include half a line in the Javadoc describing this behaviour?
Thanks,
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org