cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: svn commit: r597440 - /cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/PropertyHelper.java
Date Fri, 23 Nov 2007 01:24:15 GMT
Joerg Heinicke wrote:
> On 22.11.2007 10:49 Uhr, giacomo@apache.org wrote:
>> +           // and put back but prevent NPE because of null value ?!?!?
>> +           // TODO: How to handle value==null situations?

I have same concerns as Joerg have, but to address this TODO, I'd guess - if it 
is ever possible - it should be
                if (value == null)
                    props.remove(key);
?

Vadim

>> +           if (value != null)
>> +               props.put(key, value);
>>         }
>>      }
>>  }
> 
> How can this be null after all? From what I see value can only be null 
> if value was null in the first place, i.e. before replace(..). This 
> means that null must already have been in the Properties object which is 
> kind of impossible since Properties.put(..) inherited from HashTable 
> throws NPE on value being null.
> 
> Where do you have this Properties object from which is only injected by 
> the user into AbstractSettingsBeanFactoryPostProcessor?
> 
> Joerg
> 


Mime
View raw message