harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r414139 - /incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionTest.java
Date Wed, 14 Jun 2006 08:09:55 GMT
Author: smishura
Date: Wed Jun 14 01:09:54 2006
New Revision: 414139

URL: http://svn.apache.org/viewvc?rev=414139&view=rev
Log:
Removing SerializableAssert interface

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionTest.java?rev=414139&r1=414138&r2=414139&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionTest.java
Wed Jun 14 01:09:54 2006
@@ -21,7 +21,6 @@
 
 package java.security.serialization;
 
-import java.io.Serializable;
 import java.security.Permission;
 
 import org.apache.harmony.security.tests.support.SerializationTest;
@@ -32,8 +31,7 @@
  * 
  */
 
-public class PermissionTest extends SerializationTest implements
-        SerializationTest.SerializableAssert {
+public class PermissionTest extends SerializationTest {
 
     /**
      * @see com.intel.drl.test.SerializationTest#getData()
@@ -42,12 +40,6 @@
         return new Object[] { new RealPermission(null),
                 new RealPermission("IYF&*%^sd 43") };
     }
-
-    public void assertDeserialized(Serializable golden, Serializable test) {
-        assertSame(golden.getClass(), test.getClass());
-        assertEquals(((Permission) golden).getName(), ((Permission) test)
-                .getName());
-    }
 }
 
 // Bare extension to instantiate abstract Permission class
@@ -58,6 +50,13 @@
     }
 
     public boolean equals(Object obj) {
+        if (obj instanceof RealPermission) {
+            String name = ((RealPermission) obj).getName();
+            if (name == null) {
+                return getName() == null;
+            }
+            return name.equals(getName());
+        }
         return false;
     }
 



Mime
View raw message