]> gcc.gnu.org Git - gcc.git/commitdiff
ObjectStreamClass.java (findAccessibleMethod): Allow protected readResolve().
authorAndrew Haley <aph@redhat.com>
Tue, 15 Nov 2005 17:08:45 +0000 (17:08 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Tue, 15 Nov 2005 17:08:45 +0000 (17:08 +0000)
2005-09-16  Andrew Haley  <aph@redhat.com>

        * java/io/ObjectStreamClass.java (findAccessibleMethod): Allow
        protected readResolve().  Rewrite accessibility check.

From-SVN: r107027

libjava/classpath/ChangeLog
libjava/classpath/java/io/ObjectStreamClass.java

index 6463f49c28d24eeff386e00933d4bcc1163bfb3a..e1868f26ea2187ddb7fc50b5a912b33f4cb6195f 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-16  Andrew Haley  <aph@redhat.com>
+
+        * java/io/ObjectStreamClass.java (findAccessibleMethod): Allow
+        protected readResolve().  Rewrite accessibility check.
+
 2005-09-06  Mark Wielaard  <mark@klomp.org>
 
        * NEWS: Add new features for 0.18.
index b7bd1271324a3f5113cd8afe02c2c9b5bed033bd..975dbfc66d00d7c4517204f0c59c47193435c28d 100644 (file)
@@ -514,14 +514,15 @@ outer:
          {
            Method res = c.getDeclaredMethod(name, noArgs);
            int mods = res.getModifiers();
-
-           if (c != from
-               && (Modifier.isPrivate(mods)
-                   || ! Modifier.isPublic(mods) && ! inSamePackage(c, from)))
-             continue;
-
-           AccessController.doPrivileged(new SetAccessibleAction(res));
-           return res;
+           
+           if (c == from  
+               || Modifier.isProtected(mods)
+               || Modifier.isPublic(mods)
+               || (! Modifier.isPrivate(mods) && inSamePackage(c, from)))
+             {
+               AccessController.doPrivileged(new SetAccessibleAction(res));
+               return res;
+             }
          }
        catch (NoSuchMethodException e)
          {
This page took 0.064846 seconds and 5 git commands to generate.