harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r414063 - /incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
Date Wed, 14 Jun 2006 04:17:15 GMT
Author: smishura
Date: Tue Jun 13 21:17:14 2006
New Revision: 414063

URL: http://svn.apache.org/viewvc?rev=414063&view=rev
Log:
Return empty enumeration instead of null

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java?rev=414063&r1=414062&r2=414063&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionCollectionTest.java
Tue Jun 13 21:17:14 2006
@@ -24,6 +24,7 @@
 import java.security.Permission;
 import java.security.PermissionCollection;
 import java.util.Enumeration;
+import java.util.NoSuchElementException;
 
 import org.apache.harmony.security.tests.support.SerializationTest;
 
@@ -61,8 +62,17 @@
 
     public void add(Permission permission) {}
 
-    public Enumeration elements() {
-        return null;
+    public Enumeration<Permission> elements() {
+
+        return new Enumeration<Permission>() {
+            public boolean hasMoreElements() {
+                return false;
+            }
+
+            public Permission nextElement() {
+                throw new NoSuchElementException();
+            }
+        };
     }
 
     public boolean implies(Permission permission) {



Mime
View raw message