You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/09/26 14:59:28 UTC

svn commit: r1390451 - /cxf/branches/2.5.x-fixes/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java

Author: dkulp
Date: Wed Sep 26 12:59:28 2012
New Revision: 1390451

URL: http://svn.apache.org/viewvc?rev=1390451&view=rev
Log:
Fix compile failure on Java 5/6

Modified:
    cxf/branches/2.5.x-fixes/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java

Modified: cxf/branches/2.5.x-fixes/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java?rev=1390451&r1=1390450&r2=1390451&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java Wed Sep 26 12:59:28 2012
@@ -26,9 +26,9 @@ import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.Enumeration;
 import java.util.List;
+import java.util.NoSuchElementException;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import javax.xml.bind.JAXBElement;
@@ -284,7 +284,14 @@ public abstract class WsnBrokerTest exte
         @Override
         public Enumeration<URL> getResources(String name) throws IOException {
             if ("META-INF/services/javax.xml.ws.spi.Provider".equals(name)) {
-                return Collections.emptyEnumeration();
+                return new Enumeration<URL>() {
+                    public boolean hasMoreElements() {
+                        return false;
+                    }
+                    public URL nextElement() {
+                        throw new NoSuchElementException();
+                    }
+                };
             }
             return super.getResources(name);
         }