classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Allow Security.setProperty("foo", null)


From: Gary Benson
Subject: [cp-patches] FYI: Allow Security.setProperty("foo", null)
Date: Mon, 12 Dec 2005 15:31:24 +0000

Hi,

At the moment Security.setProperty() will not allow the setting of
null property values.  Since Security.getProperty() returns null for
unset properties this means that the following will fail:

  String key = "some.old.property";
  Security.setProperty(key, Security.getProperty(key));

The javadoc is unclear: it says nothing about null values, but it
doesn't say anything about throwing NullPointerExceptions (which we
currently do).  I tried it on a proprietary JVM and it accepted the
null pointer.  On the principle of accepting what you emit I think we
should do the same.

Also included in this patch is the spelling correction
s/datnum/datum/.

Cheers,
Gary

Attachment: patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]