[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/26995] New: javax.naming.BasicAttribute[s] don't serializ
From: |
johnandtina at byu dot net |
Subject: |
[Bug classpath/26995] New: javax.naming.BasicAttribute[s] don't serialize properly |
Date: |
3 Apr 2006 02:17:38 -0000 |
The Vector's that back BasicAttribute and BasicAttributes are marked transient
and there have no writeObject or readObject methods, so their data doesn't get
serialized and they throw a NullPointerException after deserialization.
For example:
bsh % import javax.naming.directory.*;
bsh % ba = new BasicAttributes("testkey", "testvalue");
bsh % pos = new PipedOutputStream();
bsh % pis = new PipedInputStream();
bsh % pos.connect(pis);
bsh % oos = new ObjectOutputStream(pos);
bsh % ois = new ObjectInputStream(pis);
bsh % oos.writeObject(ba);
bsh % show();
bsh % ois.readObject();
// Error: Unknown error: java.lang.NullPointerException
bsh % a = ba.get("testkey");
<testkey;testvalue>
bsh % oos.writeObject(a);
bsh % ois.readObject();
// Error: Unknown error: java.lang.NullPointerException
bsh % oos.writeObject(new Integer(42));
bsh % ois.readObject();
<42>
--
Summary: javax.naming.BasicAttribute[s] don't serialize properly
Product: classpath
Version: 0.90
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: johnandtina at byu dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26995
- [Bug classpath/26995] New: javax.naming.BasicAttribute[s] don't serialize properly,
johnandtina at byu dot net <=