Author: clebert.suconic(a)jboss.com
Date: 2010-09-10 11:23:04 -0400 (Fri, 10 Sep 2010)
New Revision: 9667
Modified:
trunk/src/main/org/hornetq/core/registry/JndiBindingRegistry.java
Log:
Fixing a few tests
Modified: trunk/src/main/org/hornetq/core/registry/JndiBindingRegistry.java
===================================================================
--- trunk/src/main/org/hornetq/core/registry/JndiBindingRegistry.java 2010-09-10 09:48:22
UTC (rev 9666)
+++ trunk/src/main/org/hornetq/core/registry/JndiBindingRegistry.java 2010-09-10 15:23:04
UTC (rev 9667)
@@ -44,7 +44,14 @@
{
try
{
- return context.lookup(name);
+ if (context == null)
+ {
+ return null;
+ }
+ else
+ {
+ return context.lookup(name);
+ }
}
catch (NamingException e)
{
@@ -68,7 +75,10 @@
{
try
{
- context.unbind(name);
+ if (context != null)
+ {
+ context.unbind(name);
+ }
}
catch (NamingException e)
{
@@ -79,7 +89,10 @@
{
try
{
- context.close();
+ if (context != null)
+ {
+ context.close();
+ }
}
catch (NamingException e)
{