juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r1226926 - in /juddi/scout/trunk/src/main/java/org/apache/ws/scout: registry/AuthTokenV3Singleton.java registry/RegistryV3Impl.java transport/LocalTransport.java
Date Tue, 03 Jan 2012 19:22:28 GMT
Author: kstam
Date: Tue Jan  3 19:22:27 2012
New Revision: 1226926

URL: http://svn.apache.org/viewvc?rev=1226926&view=rev
Log:
SCOUT-122, handle a null response, so errors are not NPEs and can be understood more easily.

Modified:
    juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/AuthTokenV3Singleton.java
    juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
    juddi/scout/trunk/src/main/java/org/apache/ws/scout/transport/LocalTransport.java

Modified: juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/AuthTokenV3Singleton.java
URL: http://svn.apache.org/viewvc/juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/AuthTokenV3Singleton.java?rev=1226926&r1=1226925&r2=1226926&view=diff
==============================================================================
--- juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/AuthTokenV3Singleton.java
(original)
+++ juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/AuthTokenV3Singleton.java
Tue Jan  3 19:22:27 2012
@@ -25,7 +25,7 @@ public class AuthTokenV3Singleton {
 		if (instance == null) {
 			instance = new AuthTokenV3Singleton();
 		}
-		cachedAuthTokenHash.put(username, token);
+		if (token!=null) cachedAuthTokenHash.put(username, token);
 	}
 	
 	public synchronized static void deleteAuthToken(String username) {

Modified: juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
URL: http://svn.apache.org/viewvc/juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java?rev=1226926&r1=1226925&r2=1226926&view=diff
==============================================================================
--- juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java (original)
+++ juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java Tue Jan
 3 19:22:27 2012
@@ -900,9 +900,10 @@ public class RegistryV3Impl implements I
 			getAuthTokenURI = this.getPublishURI();
 		}
 		
-        AuthToken at;
+        AuthToken at = null;
         JAXBElement<?> o = execute(this.objectFactory.createGetAuthToken(request),

         		getAuthTokenURI);
+        if (o!=null)
         at = (AuthToken) o.getValue();
 
         return at;

Modified: juddi/scout/trunk/src/main/java/org/apache/ws/scout/transport/LocalTransport.java
URL: http://svn.apache.org/viewvc/juddi/scout/trunk/src/main/java/org/apache/ws/scout/transport/LocalTransport.java?rev=1226926&r1=1226925&r2=1226926&view=diff
==============================================================================
--- juddi/scout/trunk/src/main/java/org/apache/ws/scout/transport/LocalTransport.java (original)
+++ juddi/scout/trunk/src/main/java/org/apache/ws/scout/transport/LocalTransport.java Tue
Jan  3 19:22:27 2012
@@ -61,7 +61,7 @@ public class LocalTransport implements T
     	Object requestHandler = c.newInstance();
     	Method method = c.getMethod(methodName, Element.class);
     	Node node = (Node) method.invoke(requestHandler, request);
-    	if (node.getFirstChild()!=null) {
+    	if (node!=null && node.getFirstChild()!=null) {
     		response = (Element) node.getFirstChild();
     	}
     } catch (Exception ex) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message