cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r531317 - in /incubator/cxf/trunk/rt/frontend/jaxws/src: main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java test/java/org/apache/cxf/jaxws/SOAPBindingTest.java
Date Mon, 23 Apr 2007 02:58:29 GMT
Author: gawor
Date: Sun Apr 22 19:58:28 2007
New Revision: 531317

URL: http://svn.apache.org/viewvc?view=rev&rev=531317
Log:
getRoles() should return empty set instead of null

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SOAPBindingTest.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java?view=diff&rev=531317&r1=531316&r2=531317
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
Sun Apr 22 19:58:28 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.jaxws.binding.soap;
 
+import java.util.Collections;
 import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.logging.Logger;
@@ -51,7 +52,11 @@
     }
     
     public Set<String> getRoles() {
-        return this.roles;
+        if (this.roles == null) {
+            return Collections.emptySet();
+        } else {
+            return this.roles;
+        }
     }
 
     public void setRoles(Set<String> set) {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SOAPBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SOAPBindingTest.java?view=diff&rev=531317&r1=531316&r2=531317
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SOAPBindingTest.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SOAPBindingTest.java
Sun Apr 22 19:58:28 2007
@@ -53,7 +53,8 @@
         assertTrue(bindingProvider.getBinding() instanceof SOAPBinding);
         SOAPBinding binding = (SOAPBinding)bindingProvider.getBinding();
         
-        assertNull(binding.getRoles());
+        assertNotNull(binding.getRoles());
+        assertEquals(0, binding.getRoles().size());
         
         Set<String> roles = new HashSet<String>();
         roles.add(Soap11.getInstance().getNextRole());



Mime
View raw message