You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/05/04 18:25:50 UTC

DO NOT REPLY [Bug 42334] - PropertyHelper.setProperty() throws NullPointerException when the property value is not a String

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=42334>.
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=42334


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7.1




------- Additional Comments From peterreilly@apache.org  2007-05-04 09:25 -------
I am not too sure that it correct to have non string values
for system properties. It is of course possible
to set them (since Properties extends Hashtable),
but it does break the contract of system properties.

In the javadoc for java.lang.Properties, the following
is stated
"""
Because Properties inherits from Hashtable, the put and putAll methods can be
applied to a Properties object. Their use is strongly discouraged as they allow
the caller to insert entries whose keys or values are not Strings. The
setProperty method should be used instead. If the store or save method is called
on a "compromised" Properties object that contains a non-String key or value,
the call will fail.
"""


However, as it is possible to encounter such invalid uses, the
ant code has been modified and will be available in ant 1.7.1

Thanks for the Bug Report.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org