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
This commit is contained in:
Donald Woods 2010-06-15 02:15:13 +00:00
parent 72ddd27a00
commit 73692a6d32
1 changed files with 7 additions and 2 deletions

View File

@ -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
}
}
}
}