Sorry, having confused you.
I have a file named global.properties. This file is edited manually by me.
The webapplication loads this file into a java.util.Properties-instance at
start.
Everywhere I use this Properties instance like "props.getProperty("myProp")"
I have to check whether a "null" i
Rapthor wrote:
>
>
> Donald McLean wrote:
>>
>> Really? That sounds like a case of "The cure is worse than the disease."
>>
>> I can't imagine a single case where something like that would be a
>> better solution than the three or four t
Scot P. Floess wrote:
>
> If a property does not exist, why is a null pointer thrown? I assume
> you mean java.util.Properties? If so, that does not raise a null
> pointer exception.
>
You are right ... the NullPointerException would be thrown if I relied on a
value read from the Propertie
Donald McLean wrote:
>
> Really? That sounds like a case of "The cure is worse than the disease."
>
> I can't imagine a single case where something like that would be a
> better solution than the three or four techniques for providing static
> attributes that I'm already familiar with.
>
> H
Hi,
I think this problem is very interesting. I have a web application that
needs various configuration. I'm using a properties file that is loaded into
a Properties-class.
The problem arrises when runtime exceptions are thrown
(NullPointerException) by using:
String value = props.getProperty("