From 73692a6d3235414427f2792b348a885fb19d0faf Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Tue, 15 Jun 2010 02:15:13 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@954695 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/lib/conf/Configurations.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java index fb4d9cd03..898a3efbb 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java @@ -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 + } + } } }