You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anton Luht (JIRA)" <ji...@apache.org> on 2006/08/09 15:17:14 UTC

[jira] Created: (HARMONY-1123) Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler

Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler
-----------------------------------------------------------------------------------------------------

                 Key: HARMONY-1123
                 URL: http://issues.apache.org/jira/browse/HARMONY-1123
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP Professional IA32
            Reporter: Anton Luht
            Priority: Minor
         Attachments: Test.class

The following code:

import java.io.ObjectStreamClass;
import java.io.Serializable;

public class Test implements Serializable {
    public static void main(String[] args) {
        System.err.println(ObjectStreamClass.lookup(Test.class).getSerialVersionUID());
    }
}

compled with Eclipse compiler prints in DRLVM+Harmony serial version that differs from RI:

RI 1.4:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)      17:11
BEA WebLogic JRockit(TM) 1.4.2_04 JVM  (build ari-31788-20040616-1132-win-ia32,
Native Threads, GC strategy: parallel)

-685733381553069680

RI 1.5:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
 System optimized over throughput (initial strategy singleparpar))

-685733381553069680

DRLVM + Harmony:
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r430024, (Aug  9 2006), Windows/ia32/msvc 1310, debug build
http://incubator.apache.org/harmony
5425548825465637688

If we compile same class with RI 1.4 or 1.5 javac , all serial version uids will be the same:

with 1.4 javac : 2581399349675783478
with 1.5 javac : -1279921928557717157

Please see class file attached.


-- 
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-1123) Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1123?page=all ]

Geir Magnusson Jr reassigned HARMONY-1123:
------------------------------------------

    Assignee: Geir Magnusson Jr

> Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1123
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1123
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional IA32
>            Reporter: Anton Luht
>         Assigned To: Geir Magnusson Jr
>            Priority: Minor
>         Attachments: Test.class
>
>
> The following code:
> import java.io.ObjectStreamClass;
> import java.io.Serializable;
> public class Test implements Serializable {
>     public static void main(String[] args) {
>         System.err.println(ObjectStreamClass.lookup(Test.class).getSerialVersionUID());
>     }
> }
> compled with Eclipse compiler prints in DRLVM+Harmony serial version that differs from RI:
> RI 1.4:
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)      17:11
> BEA WebLogic JRockit(TM) 1.4.2_04 JVM  (build ari-31788-20040616-1132-win-ia32,
> Native Threads, GC strategy: parallel)
> -685733381553069680
> RI 1.5:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> -685733381553069680
> DRLVM + Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r430024, (Aug  9 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> 5425548825465637688
> If we compile same class with RI 1.4 or 1.5 javac , all serial version uids will be the same:
> with 1.4 javac : 2581399349675783478
> with 1.5 javac : -1279921928557717157
> Please see class file attached.

-- 
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-1123) Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1123?page=comments#action_12428741 ] 
            
Tim Ellison commented on HARMONY-1123:
--------------------------------------

There is no requirement for them to be the same.  Indeed the serialization spec explicitly states that the default SUID may vary by compiler.

I propose that this is resolved as won't fix.


> Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1123
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1123
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional IA32
>            Reporter: Anton Luht
>            Priority: Minor
>         Attachments: Test.class
>
>
> The following code:
> import java.io.ObjectStreamClass;
> import java.io.Serializable;
> public class Test implements Serializable {
>     public static void main(String[] args) {
>         System.err.println(ObjectStreamClass.lookup(Test.class).getSerialVersionUID());
>     }
> }
> compled with Eclipse compiler prints in DRLVM+Harmony serial version that differs from RI:
> RI 1.4:
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)      17:11
> BEA WebLogic JRockit(TM) 1.4.2_04 JVM  (build ari-31788-20040616-1132-win-ia32,
> Native Threads, GC strategy: parallel)
> -685733381553069680
> RI 1.5:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> -685733381553069680
> DRLVM + Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r430024, (Aug  9 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> 5425548825465637688
> If we compile same class with RI 1.4 or 1.5 javac , all serial version uids will be the same:
> with 1.4 javac : 2581399349675783478
> with 1.5 javac : -1279921928557717157
> Please see class file attached.

-- 
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-1123) Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler

Posted by "Anton Luht (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1123?page=comments#action_12428761 ] 
            
Anton Luht commented on HARMONY-1123:
-------------------------------------

The problem is not the varying by compiler but that class compiled by Eclipse compiler has different SUIDs in RI and Harmony. If we serialize this class in RI and try to deserialize in Harmony - we'll fail and vice versa.

> Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1123
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1123
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional IA32
>            Reporter: Anton Luht
>            Priority: Minor
>         Attachments: Test.class
>
>
> The following code:
> import java.io.ObjectStreamClass;
> import java.io.Serializable;
> public class Test implements Serializable {
>     public static void main(String[] args) {
>         System.err.println(ObjectStreamClass.lookup(Test.class).getSerialVersionUID());
>     }
> }
> compled with Eclipse compiler prints in DRLVM+Harmony serial version that differs from RI:
> RI 1.4:
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)      17:11
> BEA WebLogic JRockit(TM) 1.4.2_04 JVM  (build ari-31788-20040616-1132-win-ia32,
> Native Threads, GC strategy: parallel)
> -685733381553069680
> RI 1.5:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> -685733381553069680
> DRLVM + Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r430024, (Aug  9 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> 5425548825465637688
> If we compile same class with RI 1.4 or 1.5 javac , all serial version uids will be the same:
> with 1.4 javac : 2581399349675783478
> with 1.5 javac : -1279921928557717157
> Please see class file attached.

-- 
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-1123) Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1123?page=all ]

Geir Magnusson Jr resolved HARMONY-1123.
----------------------------------------

    Resolution: Fixed

r451082

Tested classlib on Ubuntu 6 using J9 vm.  This fix didn't break anything, 

Fixed the problem, at least w/ simple test classes compiled by Sun's javac and then run on both the RI and DRLVM+classlib

> Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1123
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1123
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional IA32
>            Reporter: Anton Luht
>         Assigned To: Geir Magnusson Jr
>            Priority: Minor
>         Attachments: Test.class
>
>
> The following code:
> import java.io.ObjectStreamClass;
> import java.io.Serializable;
> public class Test implements Serializable {
>     public static void main(String[] args) {
>         System.err.println(ObjectStreamClass.lookup(Test.class).getSerialVersionUID());
>     }
> }
> compled with Eclipse compiler prints in DRLVM+Harmony serial version that differs from RI:
> RI 1.4:
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)      17:11
> BEA WebLogic JRockit(TM) 1.4.2_04 JVM  (build ari-31788-20040616-1132-win-ia32,
> Native Threads, GC strategy: parallel)
> -685733381553069680
> RI 1.5:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> -685733381553069680
> DRLVM + Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r430024, (Aug  9 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> 5425548825465637688
> If we compile same class with RI 1.4 or 1.5 javac , all serial version uids will be the same:
> with 1.4 javac : 2581399349675783478
> with 1.5 javac : -1279921928557717157
> Please see class file attached.

-- 
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-1123) Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1123?page=all ]

Geir Magnusson Jr closed HARMONY-1123.
--------------------------------------


> Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1123
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1123
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional IA32
>            Reporter: Anton Luht
>         Assigned To: Geir Magnusson Jr
>            Priority: Minor
>         Attachments: Test.class
>
>
> The following code:
> import java.io.ObjectStreamClass;
> import java.io.Serializable;
> public class Test implements Serializable {
>     public static void main(String[] args) {
>         System.err.println(ObjectStreamClass.lookup(Test.class).getSerialVersionUID());
>     }
> }
> compled with Eclipse compiler prints in DRLVM+Harmony serial version that differs from RI:
> RI 1.4:
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)      17:11
> BEA WebLogic JRockit(TM) 1.4.2_04 JVM  (build ari-31788-20040616-1132-win-ia32,
> Native Threads, GC strategy: parallel)
> -685733381553069680
> RI 1.5:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> -685733381553069680
> DRLVM + Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r430024, (Aug  9 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> 5425548825465637688
> If we compile same class with RI 1.4 or 1.5 javac , all serial version uids will be the same:
> with 1.4 javac : 2581399349675783478
> with 1.5 javac : -1279921928557717157
> Please see class file attached.

-- 
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-1123) Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1123?page=comments#action_12428951 ] 
            
Alexey Petrenko commented on HARMONY-1123:
------------------------------------------

I agree with Anton here. We can not simply close this class because the problem is that Harmony and RI produces different SUIDs for the same class compiled by Eclipse compiler.

> Different class serialVesrionUIDs printed by RI and harmony when class compiled with Eclipse compiler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1123
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1123
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP Professional IA32
>            Reporter: Anton Luht
>            Priority: Minor
>         Attachments: Test.class
>
>
> The following code:
> import java.io.ObjectStreamClass;
> import java.io.Serializable;
> public class Test implements Serializable {
>     public static void main(String[] args) {
>         System.err.println(ObjectStreamClass.lookup(Test.class).getSerialVersionUID());
>     }
> }
> compled with Eclipse compiler prints in DRLVM+Harmony serial version that differs from RI:
> RI 1.4:
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)      17:11
> BEA WebLogic JRockit(TM) 1.4.2_04 JVM  (build ari-31788-20040616-1132-win-ia32,
> Native Threads, GC strategy: parallel)
> -685733381553069680
> RI 1.5:
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> -685733381553069680
> DRLVM + Harmony:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r430024, (Aug  9 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> 5425548825465637688
> If we compile same class with RI 1.4 or 1.5 javac , all serial version uids will be the same:
> with 1.4 javac : 2581399349675783478
> with 1.5 javac : -1279921928557717157
> Please see class file attached.

-- 
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