harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-812) transient fields are serialized
Date Tue, 11 Jul 2006 12:12:30 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-812?page=comments#action_12420289 ] 

Alexey Varlamov commented on HARMONY-812:
-----------------------------------------

Anton,

I found a bug in DRLVM which provoked such problme, see H-835.

> transient fields are serialized
> -------------------------------
>
>          Key: HARMONY-812
>          URL: http://issues.apache.org/jira/browse/HARMONY-812
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>  Environment: Windows XP professional
>     Reporter: Anton Luht
>     Priority: Minor

>
> Classlib + VM version 419914 
> build: win_ia32_msvc_debug
> Fields that are marked as 'transient' are serialized though they shouldn't
> Code to reproduce:
> import java.io.*;
> public class Test {
>  public static void main(String[] args) throws Throwable {
>     ByteArrayOutputStream baos = new ByteArrayOutputStream();
>     ObjectOutputStream oos = new ObjectOutputStream(baos);
>     oos.writeObject(new Transient());
>     oos.close();
>     ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
>     Transient t = (Transient) ois.readObject();
>     ois.close();
>     System.out.println(t.trs == null ? "PASSED" : "FAILED");
>  }
> }
> class Transient implements Serializable {
>     transient String trs = "aaa";
> }

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