re PR libgcj/11728 (HashMap serialization does not work)

2003-07-31  Stepan Koltsov  <yozh@mx1.ru>

	Fix for PR libgcj/11728:

From-SVN: r70037
This commit is contained in:
Stepan Koltsov 2003-08-01 03:32:42 +00:00 committed by Tom Tromey
parent 5bea01beb9
commit e14c33e5af
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-07-31 Stepan Koltsov <yozh@mx1.ru>
Fix for PR libgcj/11728:
* java/util/HashMap.java (readObject): Set size.
2003-07-31 Tom Tromey <tromey@redhat.com> 2003-07-31 Tom Tromey <tromey@redhat.com>
Fix for PR libgcj/11737: Fix for PR libgcj/11737:

View File

@ -1,6 +1,6 @@
/* HashMap.java -- a class providing a basic hashtable data structure, /* HashMap.java -- a class providing a basic hashtable data structure,
mapping Object --> Object mapping Object --> Object
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
@ -808,6 +808,7 @@ public class HashMap extends AbstractMap
// Read and use capacity, followed by key/value pairs. // Read and use capacity, followed by key/value pairs.
buckets = new HashEntry[s.readInt()]; buckets = new HashEntry[s.readInt()];
int len = s.readInt(); int len = s.readInt();
size = len;
while (len-- > 0) while (len-- > 0)
{ {
Object key = s.readObject(); Object key = s.readObject();