[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-cp] [bugs #10383] Deserialization of an empty TreeMap fails
From: |
Mark Wielaard |
Subject: |
[commit-cp] [bugs #10383] Deserialization of an empty TreeMap fails |
Date: |
Sun, 19 Sep 2004 16:19:57 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Galeon/1.3.15 (Debian package 1.3.15-2) |
This mail is an automated notification from the bugs tracker
of the project: classpath.
/**************************************************************************/
[bugs #10383] Latest Modifications:
Changes by:
Mark Wielaard <address@hidden>
'Date:
Sun 09/19/04 at 20:13 (Europe/Amsterdam)
What | Removed | Added
---------------------------------------------------------------------------
Category | inetlib | None
Resolution | None | Fixed
Assigned to | None | mark
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
Thanks for the bug report.
Good spotting.
Solved by:
2004-09-19 Mark Wielaard <address@hidden>
* java/util/TreeMap.java (root): Don't initialize.
(TreeMap(Comparator)): Call fabricateTree(0).
(fabricateTree): Initialize root and size when count is 0.
/**************************************************************************/
[bugs #10383] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10383>
Project: classpath
Submitted by: Ilya Perminov
On: Tue 09/14/04 at 19:49
Category: None
Severity: 5 - Average
Resolution: Fixed
Privacy: Public
Assigned to: mark
Status: Closed
Platform Version: None
Summary: Deserialization of an empty TreeMap fails
Original Submission: Deserialization of an empty java.util.TreeMap fails with
a
NullPointerException. It happens because transient field
"root" is not initialized during deserialization. To fix:
add root = nil; to the beginning of readObject method.
Follow-up Comments
------------------
-------------------------------------------------------
Date: Sun 09/19/04 at 20:13 By: Mark Wielaard <mark>
Thanks for the bug report.
Good spotting.
Solved by:
2004-09-19 Mark Wielaard <address@hidden>
* java/util/TreeMap.java (root): Don't initialize.
(TreeMap(Comparator)): Call fabricateTree(0).
(fabricateTree): Initialize root and size when count is 0.
-------------------------------------------------------
Date: Tue 09/14/04 at 20:23 By: David Gilbert <trebligd>
I've attached a Mauve test that triggers the bug with Classpath, and passes
with Sun's JDK 1.4. I'll forward it to the mauve-patches mailing list also.
File Attachments
-------------------
-------------------------------------------------------
Date: Tue 09/14/04 at 20:23 Name: serialization.java Size: 1.96KB By:
trebligd
Mauve test case
http://savannah.gnu.org/bugs/download.php?item_id=10383&item_file_id=1669
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10383>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/