You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2006/12/18 08:51:22 UTC

[jira] Created: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

[classlib][security]UnresolvedPermission fails in serialization.
----------------------------------------------------------------

                 Key: HARMONY-2762
                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Leo Li


Here is a testcase:

public void testSerialization() throws Exception {
		CertificateFactory factory = CertificateFactory.getInstance("X.509");
		Certificate certificate = factory
				.generateCertificate(Support_Resources
		                .getResourceStream("java/security/test.cert"));
		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
				"testType", "testName", "testActions",
				new Certificate[] { certificate });
		SerializationTest.verifySelf(unresolvedPermission);		
		SerializationTest.verifyGolden(this, unresolvedPermission);
	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2762?page=comments#action_12460158 ] 
            
Stepan Mishura commented on HARMONY-2762:
-----------------------------------------

Hi Leo,

I very weird that it is not possible to deserialize UnresolvedPermissionTest.golden.0.ser, UnresolvedPermissionTest.golden.1.ser on RI.
The files seem to be corrupted so I've regenerated them. Another strange thing for me that Harmony is able to deserialize them.

Thanks,
Stepan.

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2762?page=all ]

Leo Li updated HARMONY-2762:
----------------------------

    Attachment: patch-2762.zip

Hi, Stepan:
      Could you help me to verify the patch and apply it if appropriate?

Thanks
Leo.

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2762.zip, test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2762?page=all ]

Stepan Mishura closed HARMONY-2762.
-----------------------------------


Verified by Leo.

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2762.zip, test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2762?page=comments#action_12459232 ] 
            
Leo Li commented on HARMONY-2762:
---------------------------------

Hi, all:
      When making my patch, I found that there are several ser files about UnresolvedPermission cannot be deserialized on RI, which hence might make the patch I made fails on original serialization testcases. They include : UnresolvedPermissionTest.golden.0.ser, UnresolvedPermissionTest.golden.1.ser ,
UnresolvedPermissionCollectionTest.golden.1.ser  and
UnresolvedPermissionCollectionTest.golden.2.ser ,
(There exits a bug on Harmony on which thus they can pass.) 
     Could somebody help me to verify it?

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Attachments: test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2762?page=all ]

Leo Li updated HARMONY-2762:
----------------------------

    Attachment: test.zip

Here is the zip including ser files and cert files for test.

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Attachments: test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2762?page=comments#action_12460386 ] 
            
Leo Li commented on HARMONY-2762:
---------------------------------

Hi, Stepan:
      Verified. Thank you.
Leo.

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2762.zip, test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2762?page=comments#action_12460161 ] 
            
Leo Li commented on HARMONY-2762:
---------------------------------

Hi, Stepan:
      In UnresolvedPermission.writeObject(), Line 320 & Line 322, we should use writeInt() insteadof write() according to spec. And the same thing happens in readObject().  So I guess maybe we confused the ser file created by RI with that of harmony.:)

Leo.

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2762?page=all ]

Stepan Mishura reassigned HARMONY-2762:
---------------------------------------

    Assignee: Stepan Mishura

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-2762) [classlib][security]UnresolvedPermission fails in serialization.

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2762?page=all ]

Stepan Mishura resolved HARMONY-2762.
-------------------------------------

    Resolution: Fixed

Thanks Leo - the modified patch was applied to SECURITY module at r489306.

The fix also showed that golden files for UnresolvedPermissionCollectionTest are corrupted too - the test started to fail after applying your patch. So I've recreated them too.

Please check that the patch was applied as you expected.

> [classlib][security]UnresolvedPermission fails in serialization.
> ----------------------------------------------------------------
>
>                 Key: HARMONY-2762
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2762
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: patch-2762.zip, test.zip
>
>
> Here is a testcase:
> public void testSerialization() throws Exception {
> 		CertificateFactory factory = CertificateFactory.getInstance("X.509");
> 		Certificate certificate = factory
> 				.generateCertificate(Support_Resources
> 		                .getResourceStream("java/security/test.cert"));
> 		UnresolvedPermission unresolvedPermission = new UnresolvedPermission(
> 				"testType", "testName", "testActions",
> 				new Certificate[] { certificate });
> 		SerializationTest.verifySelf(unresolvedPermission);		
> 		SerializationTest.verifyGolden(this, unresolvedPermission);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira