jon * <[EMAIL PROTECTED]> wrote:
> I added that convert method because I felt that the name= portion of a
> name=value pair should be case insensitive. By making it lowercase and then
> checking for that lowercase that resolves the issue. It sounds like I (or
> someone else) forgot to put a convert() in there somewhere. The reason I
> think it should be case insensitive is that it is bad programming practice
> to depend on case sensitivity of variable names like that because it would
> be easy to spend hours tracking down that as a problem. I don't want to
> encourage that.
>
> I just checked in the one line fix to the add() method.
OK. Should we add something like this to the javadoc in order to document the
side-effect?
------------ BEGIN ------------
NOTE: The name= portion of a name=value pair will be converted to
lowercase when the object is initialized and when new data is added.
This may overwrite existing name=value pairs:
<PRE>
ParameterParser pp = data.getParameters();
pp.add("ERROR",1);
pp.add("eRrOr",2);
int result = pp.getInt("ERROR");
</PRE>
In the above example, result is 2.
------------ END ---------------
jb
Jeffrey D. Brekke
mailto:[EMAIL PROTECTED]
http://sites.netscape.net/ekkerbj/homepage
____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]