@@ -0,0 +1,1225 @@
+import java.io.ByteArrayInputStream;%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.ObjectInputStream;%0Aimport java.io.ObjectOutputStream;%0Aimport java.io.Serializable;%0A%0A%0Apublic class TransientFieldNotRestoredFalsePositive  implements Serializable %7B%0A%09%0A%09%0A%09/**%0A     * %0A     */%0A    private static final long serialVersionUID = 1L;%0A%0A%0A%09public void setX(int x) %7B%7D%0A%09%0A%09 private void readObject(java.io.ObjectInputStream in)%0A     throws IOException, ClassNotFoundException %7B%0A%09%09 System.out.println(%22read object %22 + this.getClass().getName());%0A%09%09 setX(10);%0A%09 %7D%0A%0A%09 %0A%09 static class SubClass extends TransientFieldNotRestoredFalsePositive %7B%0A%09%09 private static final long serialVersionUID = 1L;%0A%09%09 transient Integer x = 18;%0A%09%09 %0A%09%09 public void increment() %7B%0A%09%09%09 x = x+1;%0A%09%09 %7D%0A%0A%09%09 %0A%09 %7D%0A%09 %0A%09 public static void main(String args%5B%5D) throws Exception %7B%0A%09%09 ByteArrayOutputStream b = new ByteArrayOutputStream();%0A%09%09 ObjectOutputStream o = new ObjectOutputStream(b);%0A%09%09 o.writeObject(new TransientFieldNotRestoredFalsePositive());%0A%09%09 o.writeObject(new SubClass());%0A%09%09 o.close();%0A%09%09 ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(b.toByteArray()));%0A%09%09 in.readObject();%0A%09%09 in.readObject();%0A%09 %7D %0A%7D%0A

add test case