aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r1058787 - /aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java
Date Thu, 13 Jan 2011 23:07:23 GMT
Author: not
Date: Thu Jan 13 23:07:22 2011
New Revision: 1058787

URL: http://svn.apache.org/viewvc?rev=1058787&view=rev
Log:
ARIES-538 Only unget if provider is null. Provider will be null if the call to getInitialContext
throws an exception.

Modified:
    aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java

Modified: aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java
URL: http://svn.apache.org/viewvc/aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java?rev=1058787&r1=1058786&r2=1058787&view=diff
==============================================================================
--- aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java (original)
+++ aries/trunk/jndi/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java Thu
Jan 13 23:07:22 2011
@@ -222,7 +222,7 @@ public final class ContextHelper {
                   try {
                     provider = new ContextProvider(context, ref, factory.getInitialContext(environment));
                   } finally {
-                    context.ungetService(ref); // we didn't get something back, so this was
no good.
+                    if (provider == null) context.ungetService(ref); // we didn't get something
back, so this was no good.
                   }
                   break;
                 } else {



Mime
View raw message