+2000-05-04 Tom Tromey <tromey@cygnus.com>
+
+ * java/util/Locale.java (Locale): Don't explicitly check for
+ null.
+ * java/util/Hashtable.java (containsKey): Don't explicitly check
+ for null.
+ (get): Likewise.
+ * java/util/BitSet.java (and, or, xor): Don't explicitly check for
+ null.
+ * java/util/zip/ZipEntry.java (ZipEntry): Don't explicitly check
+ for null.
+ * java/text/StringCharacterIterator.java
+ (StringCharacterIterator): Don't check for null.
+ * java/text/ChoiceFormat.java (setChoices): Don't explicitly check
+ for null pointer.
+ * java/net/MulticastSocket.java (joinGroup): Don't explicitly
+ check for null pointer.
+ (leaveGroup): Likewise.
+ * java/net/DatagramPacket.java (DatagramPacket): Removed erroneous
+ comment.
+ (setData): Likewise.
+ * java/lang/ThreadGroup.java (ThreadGroup): Don't explicitly check
+ for `p==null'.
+
+2000-04-23 Tom Tromey <tromey@cygnus.com>
+
+ * prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.
+ (_Jv_PrimClass): Set `methods' by calling _Jv_FindArrayClass.
+ * include/jvm.h (struct _Jv_ArrayVTable): Declare.
+ (NUM_OBJECT_METHODS): New define.
+ * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added
+ `array_vtable' parameter. Added assertion.
+ * java/lang/Class.h (_Jv_FindArrayClass): Added `array_vtable'
+ parameter.
+
2000-04-28 Jakub Jelinek <jakub@redhat.com>
* Makefile.am (GCJCOMPILE, JCFLAGS, JF1CLAGS, jv_convert_LINK,
// ThreadGroup.java - ThreadGroup class.
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
This file is part of libgcj.
public ThreadGroup (ThreadGroup p, String n)
{
checkAccess ();
- if (p == null)
- throw new NullPointerException ();
if (p.destroyed_flag)
throw new IllegalArgumentException ();
// DatagramPacket.java - Represents packets in a connectionless protocol.
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libgcj.
// JDK1.2
public DatagramPacket(byte[] buf, int offset, int length)
{
- // FIXME: We can't currently rely on NullPointerException being
- // thrown when we invoke a method on a null object.
if (buf == null)
throw new NullPointerException("Null buffer");
if (offset < 0)
public DatagramPacket(byte[] buf, int offset, int length,
InetAddress address, int port)
{
- // FIXME: We can't currently rely on NullPointerException being
- // thrown when we invoke a method on a null object.
if (buf == null)
throw new NullPointerException("Null buffer");
if (offset < 0)
{
// This form of setData must be used if offset is to be changed.
- // FIXME: We can't currently rely on NullPointerException being
- // thrown when we invoke a method on a null object.
if (buf == null)
throw new NullPointerException("Null buffer");
if (offset < 0)
// MulticastSocket.java
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libgcj.
public void joinGroup(InetAddress mcastaddr) throws IOException
{
- // FIXME: We can't currently rely on NullPointerException being
- // thrown when we invoke a method on a null object.
- if (mcastaddr == null)
- throw new NullPointerException("Null address");
if (! mcastaddr.isMulticastAddress())
throw new IOException("Not a Multicast address");
public void leaveGroup(InetAddress mcastaddr) throws IOException
{
- // FIXME: We can't currently rely on NullPointerException being
- // thrown when we invoke a method on a null object.
- if (mcastaddr == null)
- throw new NullPointerException("Null address");
if (! mcastaddr.isMulticastAddress())
throw new IOException("Not a Multicast address");
// ChoiceFormat.java - Formatter for `switch'-like string substitution.
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libgcj.
public void setChoices (double[] limits, String[] strings)
{
- if (limits == null || strings == null)
- throw new NullPointerException ();
if (limits.length != strings.length)
throw new IllegalArgumentException ();
this.strings = (String[]) strings.clone();
// StringCharacterIterator.java - Iterate over string of Unicode characters.
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libgcj.
public StringCharacterIterator (String text)
{
- // FIXME: remove check for null once we have compiler/runtime
- // support for NullPointerException.
- this (text, 0, text == null ? 0 : text.length(), 0);
+ this (text, 0, text.length(), 0);
}
public StringCharacterIterator (String text, int pos)
{
- // FIXME: remove check for null once we have compiler/runtime
- // support for NullPointerException.
- this (text, 0, text == null ? 0 : text.length(), pos);
+ this (text, 0, text.length(), pos);
}
public StringCharacterIterator (String text, int begin, int end, int pos)
{
- if (text == null)
- throw new NullPointerException ();
if (begin < 0 || begin > end || end > text.length()
// In 1.1 we would also throw if `pos == end'.
|| pos < begin || pos > end)
// BitSet - A vector of bits.
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
This file is part of libgcj.
{
public void and (BitSet bs)
{
- if (bs == null)
- throw new NullPointerException ();
int max = Math.min(bits.length, bs.bits.length);
int i;
for (i = 0; i < max; ++i)
public void or (BitSet bs)
{
- if (bs == null)
- throw new NullPointerException ();
ensure (bs.bits.length - 1);
int i;
for (i = 0; i < bs.bits.length; ++i)
public void xor (BitSet bs)
{
- if (bs == null)
- throw new NullPointerException ();
ensure (bs.bits.length - 1);
int i;
for (i = 0; i < bs.bits.length; ++i)
return newTable;
}
- public synchronized boolean contains(Object value) throws NullPointerException
+ public synchronized boolean contains(Object value)
+ throws NullPointerException
{
// An exception is thrown here according to the JDK 1.2 doc.
if (value == null)
public synchronized boolean containsKey(Object key)
{
- // The Map interface mandates that we throw this.
- if (key == null)
- throw new NullPointerException ();
-
for (HashtableEntry elem = bucket[Math.abs(key.hashCode()
% bucket.length)];
elem != null; elem = elem.nextEntry)
public synchronized Object get(Object key)
{
- // The Dictionary interface mandates that get() throw a
- // NullPointerException if key is null.
- if (key == null)
- throw new NullPointerException ();
-
for (HashtableEntry elem = bucket[Math.abs (key.hashCode()
% bucket.length)];
elem != null; elem = elem.nextEntry)
}
public synchronized Object put(Object key, Object value)
- throws NullPointerException
+ throws NullPointerException
{
+ // We could really just check `value == null', but checking both
+ // is a bit clearer.
if (key == null || value == null)
throw new NullPointerException();
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
This file is part of libgcj.
public Locale (String languageCode, String countryCode,
String variantCode)
{
- // We must explicitly check the arguments.
- if (languageCode == null || countryCode == null
- || variantCode == null)
- throw new NullPointerException ();
language = languageCode.toLowerCase();
country = countryCode.toUpperCase();
variant = variantCode.toUpperCase();
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libgcj.
public ZipEntry (String name)
{
- if (name == null)
- throw new NullPointerException ();
if (name.length() > 65535)
throw new IllegalArgumentException ();
this.name = name;