[ https://issues.apache.org/jira/browse/HARMONY-6503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Catherine Hope updated HARMONY-6503: ------------------------------------ Attachment: 6503.patch Fix in ObjectStreamClass.findPrivateMethod to call Method.setAccessible (to make the read/writeObject serialization methods accessible) as a privileged operation. Regression testcase included. > [classlib][luni] ObjectOutputStream.writeObject throws AccessControlException when suppressAccessChecks not granted > ------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6503 > URL: https://issues.apache.org/jira/browse/HARMONY-6503 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Catherine Hope > Priority: Minor > Attachments: 6503.patch > > > Calling java.io.ObjectOutputStream.writeObject(ObjectOutputStream) with a security manager installed and the policy has not granted java.lang.reflect.ReflectPermission suppressAccessChecks throws a java.security.AccessControlException. > java.security.AccessControlException: Access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) > at java.security.AccessController.checkPermission(AccessController.java:95) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:862) > at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:103) > at java.io.ObjectStreamClass.findPrivateMethod(ObjectStreamClass.java:1050) > at java.io.ObjectStreamClass.createClassDesc(ObjectStreamClass.java:303) > at java.io.ObjectStreamClass.lookupStreamClass(ObjectStreamClass.java:997) > at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1696) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1639) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1603) > at org.apache.harmony.luni.tests.java.io.ObjectOutputStreamTest.test_writeObjectWithSecurityManager(ObjectOutputStreamTest.java:1406) > This does not occur on the RI. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.