You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by eb...@apache.org on 2005/09/15 10:46:31 UTC
svn commit: r289181 - in /jakarta/commons/proper/configuration/trunk:
src/java/org/apache/commons/configuration/JNDIConfiguration.java
xdocs/changes.xml
Author: ebourg
Date: Thu Sep 15 01:46:25 2005
New Revision: 289181
URL: http://svn.apache.org/viewcvs?rev=289181&view=rev
Log:
JNDIConfiguration no longer logs an error when attempting to get a property that doesn't exist in the configuration (Bug 36664)
Modified:
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/JNDIConfiguration.java
jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/JNDIConfiguration.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/JNDIConfiguration.java?rev=289181&r1=289180&r2=289181&view=diff
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/JNDIConfiguration.java (original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/JNDIConfiguration.java Thu Sep 15 01:46:25 2005
@@ -25,6 +25,7 @@
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
@@ -329,6 +330,11 @@
getBaseContext().lookup(key);
return true;
}
+ catch (NameNotFoundException e)
+ {
+ // expected exception, no need to log it
+ return false;
+ }
catch (NamingException e)
{
log.error(e.getMessage(), e);
@@ -371,6 +377,11 @@
{
key = StringUtils.replace(key, ".", "/");
return getBaseContext().lookup(key);
+ }
+ catch (NameNotFoundException e)
+ {
+ // expected exception, no need to log it
+ return null;
}
catch (NamingException e)
{
Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/xdocs/changes.xml?rev=289181&r1=289180&r2=289181&view=diff
==============================================================================
--- jakarta/commons/proper/configuration/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Thu Sep 15 01:46:25 2005
@@ -23,6 +23,10 @@
<body>
<release version="1.2-dev" date="in SVN">
+ <action dev="ebourg" type="update" issue="36664">
+ JNDIConfiguration no longer logs an error when attempting to get
+ a property that doesn't exist in the configuration.
+ </action>
<action dev="ebourg" type="update" issue="36488">
Attempting to load a configuration from a directory instead of a file
will now throw a ConfigurationException.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org