logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Lundesgaard" <...@enonic.com>
Subject BUG: PropertySetter ignores default properties in the java.util.Properties object sent to setProperties(java.util.Properties, String)
Date Fri, 16 Nov 2001 10:55:36 GMT
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 (glu@enonic.com <mailto:glu@enonic.com>)
Enonic AS (www.enonic.com)


--
To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


Mime
View raw message