ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcunn...@apache.org
Subject svn commit: r754564 - in /webservices/scout/trunk/scout/src: main/java/org/apache/ws/scout/registry/RegistryImpl.java test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java
Date Sun, 15 Mar 2009 00:17:22 GMT
Author: tcunning
Date: Sun Mar 15 00:17:21 2009
New Revision: 754564

URL: http://svn.apache.org/viewvc?rev=754564&view=rev
Log:
SCOUT-74
Make sure that the TModelKeyArray is not null - set it to an 
empty array and fix the RegistryTest so that it can handle this situation
as well as handle a null TModelKeyArray.

Modified:
    webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java
    webservices/scout/trunk/scout/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java

Modified: webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java
URL: http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java?rev=754564&r1=754563&r2=754564&view=diff
==============================================================================
--- webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java
(original)
+++ webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java
Sun Mar 15 00:17:21 2009
@@ -696,9 +696,14 @@
 		}
 
 		if (tModelBag != null) {
+			if (tModelBag.getTModelKeyArray().length == 0) {
+				tModelBag.setTModelKeyArray(new String[1]);
+			}
 			request.setTModelBag(tModelBag);
 		} else {
-			request.setTModelBag(TModelBag.Factory.newInstance());
+			TModelBag tmb = TModelBag.Factory.newInstance();
+			tmb.setTModelKeyArray(new String[1]);
+			request.setTModelBag(tmb);
 		}
 
 		if (findQualifiers != null) {

Modified: webservices/scout/trunk/scout/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java
URL: http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java?rev=754564&r1=754563&r2=754564&view=diff
==============================================================================
--- webservices/scout/trunk/scout/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java
(original)
+++ webservices/scout/trunk/scout/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java
Sun Mar 15 00:17:21 2009
@@ -209,12 +209,14 @@
             BulkResponse br2  = blm.saveServiceBindings(serviceBindings); //Save one more
             assertEquals(BulkResponse.STATUS_SUCCESS, br2.getStatus());
            
-            //Delete one binding
+            //Delete one binding            
             Collection<ServiceBinding> serviceBindings2 = finder.findServiceBindings(service.getKey());
-            ServiceBinding serviceBinding2 = serviceBindings2.iterator().next();
-            Remover remover = new Remover(blm);
-            remover.removeServiceBinding(serviceBinding2);
-            
+            if ((serviceBindings2 != null) && (serviceBindings2.iterator() != null)

+            		&& (serviceBindings2.iterator().hasNext())) {
+            	ServiceBinding serviceBinding2 = serviceBindings2.iterator().next();
+            	Remover remover = new Remover(blm);
+            	remover.removeServiceBinding(serviceBinding2);
+            }
 		} catch (JAXRException re) {
 			fail(re.getMessage());
 		}



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