[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-classpath] [Bug classpath/23279] New: java.util.Observable#add does
From: |
ovidr at users dot sourceforge dot net |
Subject: |
[bug-classpath] [Bug classpath/23279] New: java.util.Observable#add doesn't throw NPE when adding a null Observer |
Date: |
7 Aug 2005 22:06:06 -0000 |
java.util.Observable#add(Observer observer) is supposd to throw an NPE when
adding a null observer, but it doesn't.
if (observer == null)
throw new NullPointerException();
---------
Current code mentions this in the javadoc, but doesn't implement it:
/**
* Adds an Observer. If the observer was already added this method does
* nothing.
*
* @param observer Observer to add
* @throws NullPointerException if observer is null
*/
public synchronized void addObserver(Observer observer)
{
observers.add(observer);
}
--
Summary: java.util.Observable#add doesn't throw NPE when adding
a null Observer
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ovidr at users dot sourceforge dot net
CC: bug-classpath at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23279
- [bug-classpath] [Bug classpath/23279] New: java.util.Observable#add doesn't throw NPE when adding a null Observer,
ovidr at users dot sourceforge dot net <=