Hi!

I have found a bug and already reported it to the bug database before I
read that I should sent ut to this list first. Well, a bit late, here is
the thing I have reported:

BUG# 4815 - PropertySetter ignores default properties in the
java.util.Properties object sent to setProperties(java.util.Properties,
String)

The PropertySetter uses the wrong method when getting property names
from the 
java.util.Properties object. Instead of using the propertyNames()
method, the 
keys() method is used. This ignores default properties because the
keys() 
method is not a java.util.Properties method, but a java.util.Dictionary
method. 
I have made a simple patch that fixes the problem:

$ diff PropertySetter.java PropertySetter.java.new
101c101
<     for (Enumeration e = properties.keys(); e.hasMoreElements(); ) {
---
>     for (Enumeration e = properties.propertyNames();
e.hasMoreElements(); ) {

I have never submitted any bugs or patches to a OpenSource program
before now, 
so if this is the wrong way to do it, please let me know. :)


--
Georg Lundesgaard ([EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>)
Enonic AS (www.enonic.com)


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to