Locale.java (Locale): Don't explicitly check for null.
* 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'. From-SVN: r33671
This commit is contained in:
parent
4aef973c2e
commit
f70b7142c2
10 changed files with 50 additions and 57 deletions
|
@ -1,6 +1,6 @@
|
|||
// 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.
|
||||
|
||||
|
@ -32,8 +32,6 @@ public final class DatagramPacket
|
|||
// 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)
|
||||
|
@ -60,8 +58,6 @@ public final class DatagramPacket
|
|||
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)
|
||||
|
@ -145,8 +141,6 @@ public final class DatagramPacket
|
|||
{
|
||||
// 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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// MulticastSocket.java
|
||||
|
||||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -84,10 +84,6 @@ public class MulticastSocket extends DatagramSocket
|
|||
|
||||
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");
|
||||
|
||||
|
@ -100,10 +96,6 @@ public class MulticastSocket extends DatagramSocket
|
|||
|
||||
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");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue