ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcunn...@apache.org
Subject svn commit: r815583 - /webservices/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
Date Wed, 16 Sep 2009 01:28:52 GMT
Author: tcunning
Date: Wed Sep 16 01:28:52 2009
New Revision: 815583

URL: http://svn.apache.org/viewvc?rev=815583&view=rev
Log:
SCOUT-66
Make sure we don't have Null Pointer errors if one of the properties is not set.

Modified:
    webservices/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java

Modified: webservices/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
URL: http://svn.apache.org/viewvc/webservices/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java?rev=815583&r1=815582&r2=815583&view=diff
==============================================================================
--- webservices/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
(original)
+++ webservices/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
Wed Sep 16 01:28:52 2009
@@ -53,12 +53,21 @@
          * accordingly.
          */
 		this.uddiVersion = uddiVersion;
-
+		if (uddiVersion != null) {
+			prop.setProperty(RegistryImpl.UDDI_VERSION_PROPERTY_NAME, uddiVersion);
+		} else {
+    		prop.setProperty(RegistryImpl.UDDI_VERSION_PROPERTY_NAME, RegistryImpl.DEFAULT_UDDI_VERSION);
+		}
+			
+		if (uddiNamespace!=null) {
+    		prop.setProperty(RegistryImpl.UDDI_NAMESPACE_PROPERTY_NAME, uddiNamespace);
+		} else {
+			prop.setProperty(RegistryImpl.UDDI_NAMESPACE_PROPERTY_NAME, RegistryImpl.DEFAULT_UDDI_NAMESPACE);
+		}
+		
         if (transportClass!=null) {
     		prop.setProperty(RegistryImpl.TRANSPORT_CLASS_PROPERTY_NAME, transportClass);
-    		prop.setProperty(RegistryImpl.UDDI_NAMESPACE_PROPERTY_NAME, uddiNamespace);
-    		prop.setProperty(RegistryImpl.UDDI_VERSION_PROPERTY_NAME, uddiVersion);
-    	} else {
+        } else {
     		String transport = SecurityActions.getProperty(RegistryImpl.TRANSPORT_CLASS_PROPERTY_NAME);
     		if (transport != null) {
     			prop.setProperty(RegistryImpl.TRANSPORT_CLASS_PROPERTY_NAME, transport);



---------------------------------------------------------------------
To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: scout-dev-help@ws.apache.org


Mime
View raw message