openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r954695 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
Date Tue, 15 Jun 2010 02:15:13 GMT
Author: dwoods
Date: Tue Jun 15 02:15:13 2010
New Revision: 954695

URL: http://svn.apache.org/viewvc?rev=954695&view=rev
Log:
OPENJPA-1700 FindBugs - This method might drop an exception.  In general, exceptions should
be handled or reported in some way, or they should be thrown out of the method.

Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java?rev=954695&r1=954694&r2=954695&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
Tue Jun 15 02:15:13 2010
@@ -626,8 +626,13 @@ public class Configurations {
             throw new NestableRuntimeException(
                 _loc.get("naming-err", name).getMessage(), ne);
         } finally {
-            if (ctx != null)
-                try { ctx.close(); } catch (Exception e) {}
+            if (ctx != null) {
+                try {
+                    ctx.close();
+                } catch (NamingException ne) {
+                    // ignore
+                }
+            }
         }
     }
 



Mime
View raw message