harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetlana Samoilenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-414) There is no serialVersionUID in java.beans.PropertyChangeEvent class
Date Thu, 27 Apr 2006 09:55:37 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-414?page=comments#action_12376693 ] 

Svetlana Samoilenko commented on HARMONY-414:
---------------------------------------------

Mikhail,
thank you, bug is not reproducible with latest sources.

> There is no serialVersionUID in java.beans.PropertyChangeEvent class
> --------------------------------------------------------------------
>
>          Key: HARMONY-414
>          URL: http://issues.apache.org/jira/browse/HARMONY-414
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyChangeEvent.diffs
>
> Attempt to read PropertyChangeEvent.ser (unit Harmony test java.beans.PropertyChangeEventTest
) leads to java.io.InvalidClassException:
>  java.beans.PropertyChangeEvent; Incompatible class (SUID): java.beans.PropertyChangeEvent:
static final long serialVersionUID =7042693688939648123L; but expected java.beans.PropertyChangeEvent:
static final long serialVersionUID =-4648566022890635323L;
> Code for reproducing:
> import java.io.*;
> import java.util.*; 
> import java.net.*;
> import java.beans.*;
> public class test {
>     public static void main(String[] args) {
>         InputStream input = null;
>         ObjectInputStream oinput = null;
>         OutputStream output = null;
>         ObjectOutputStream ooutput = null;
>         String filename = "PropertyChangeEvent.ser";
>         URL url = test.class.getClassLoader().getResource(filename);
>         System.out.println("url="+url); 
>         try {
>             input = url.openStream();
>             oinput = new ObjectInputStream(input);
>             Object newObj = oinput.readObject();
>         }  catch (Exception e) {
>            e.printStackTrace();
>         }
>      }
> }
> Output on Harmony:
> url=file:/C:/Tests/PropertyChangeEvent.ser
> java.io.InvalidClassException: java.beans.PropertyChangeEvent; Incompatible class (SUID):
java.beans.PropertyChangeEvent: static final long serialVersionUID =7042693688939648123L;
but expected java.beans.PropertyChangeEvent: static final long serialVersionUID =-4648566022890635323L;
>         at java.io.ObjectInputStream.verifySUID(ObjectInputStream.java:2547)
>         at java.io.ObjectInputStream.readNewClassDesc(ObjectInputStream.java:1549)
>         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:680)
>         at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:1689)
>         at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:784)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1973)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:1927)
>         at test.main(test.java:42)
> Output on BEA:
> url=file:/C:/Tests/PropertyChangeEvent.ser
> PASSED

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


Mime
View raw message