I am making my first foray into CompositeConfiguration and am struggling with some basics. I am trying to create a method that returns a specified property or 'null' if it does not exist:

Public String getProperty(String prop) {
   return((String) config.getProperty(prop));
}

The problem is that I keep getting a NullPointerException. I know it is not 'config' that is null so the exception is a bit confusing. In any case I also know that the value of 'prop' is a key that does not exist. So the question really is, how do I determine that a property does not exist so I can return a null? When I search for checking existence of a property I get nothing useful and the docs don't seem to indicate a solution either. TIA.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to