[multiple changes]
2002-02-14 Mark Wielaard <mark@klomp.org> * java/math/BigInteger.java: import gnu.java.math.MPN not the whole package as a workaround for gcj 3.0.x 2002-02-14 Mark Wielaard <mark@klomp.org> * java/security/BasicPermission.java: extends with fully qualified classname as workaround for gcj 3.0.4. 2002-02-14 Eric Blake <ebb9@email.byu.edu> * java/net/DatagramSocketImpl.java (setOption, getOption): Work around gcj bug of wrong emitted qualifier for inherited method. * java/net/SocketImpl.java (setOption, getOption): Ditto. * java/util/WeakHashMap.java (WeakEntrySet): Add non-private constructor to reduce amount of emitted bytecode. While this happens to work around a jikes 1.15 bug, it is still a useful patch even for correct compilers. * java/rmi/server/RMIClassLoader.java (MyClassLoader): Ditto. * gnu/java/rmi/server/UnicastRemoteCall.java (DummyObjectOutputStream, DummyObjectInputStream): Ditto. 2002-02-14 Eric Blake <ebb9@email.byu.edu> * java/net/DatagramSocketImpl.java: Reformat (no code changes). * java/net/SocketImpl.java: Ditto. * java/rmi/server/RMIClassLoader.java: Ditto. * gnu/java/rmi/server/UnicastRemoteCall.java: Ditto. 2002-02-14 Mark Wielaard <mark@klomp.org> Thanks to Takashi Okamoto * java/util/Arrays.java (ArrayList.indexOf()): this.equals(). * java/util/Arrays.java (ArrayList.lastIndexOf()): Likewise. * java/util/WeakHashMap.java (WeakEntry.getEntry()): this.get(). From-SVN: r49778
This commit is contained in:
parent
9a360704f9
commit
894286989e
9 changed files with 536 additions and 344 deletions
|
@ -1,5 +1,5 @@
|
|||
/* Arrays.java -- Utility class with methods to operate on arrays
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -2430,7 +2430,7 @@ public class Arrays
|
|||
{
|
||||
int size = a.length;
|
||||
for (int i = 0; i < size; i++)
|
||||
if (equals(o, a[i]))
|
||||
if (this.equals(o, a[i]))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
@ -2439,7 +2439,7 @@ public class Arrays
|
|||
{
|
||||
int i = a.length;
|
||||
while (--i >= 0)
|
||||
if (equals(o, a[i]))
|
||||
if (this.equals(o, a[i]))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* java.util.WeakHashMap -- a hashtable that keeps only weak references
|
||||
to its keys, allowing the virtual machine to reclaim them
|
||||
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -169,6 +169,13 @@ public class WeakHashMap extends AbstractMap implements Map
|
|||
*/
|
||||
private final class WeakEntrySet extends AbstractSet
|
||||
{
|
||||
/**
|
||||
* Non-private constructor to reduce bytecode emitted.
|
||||
*/
|
||||
WeakEntrySet()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size of this set.
|
||||
*
|
||||
|
@ -483,7 +490,7 @@ public class WeakHashMap extends AbstractMap implements Map
|
|||
*/
|
||||
WeakEntry getEntry()
|
||||
{
|
||||
final Object key = get();
|
||||
final Object key = this.get();
|
||||
if (key == null)
|
||||
return null;
|
||||
return new WeakEntry(key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue