[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: FYI: fix PR classpath/23279
From: |
Tom Tromey |
Subject: |
[cp-patches] Patch: FYI: fix PR classpath/23279 |
Date: |
11 Aug 2005 12:12:29 -0600 |
I'm checking this in.
This is a trivial fix for PR classpath/23279.
We weren't actually checking whether the argument was null.
I added a Mauve test for this.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* java/util/Observable.java (addObserver): Throw
NullPointerException if necessary. PR classpath/23279.
Index: java/util/Observable.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/Observable.java,v
retrieving revision 1.11
diff -u -r1.11 Observable.java
--- java/util/Observable.java 2 Jul 2005 20:32:42 -0000 1.11
+++ java/util/Observable.java 11 Aug 2005 18:15:18 -0000
@@ -77,6 +77,8 @@
*/
public synchronized void addObserver(Observer observer)
{
+ if (observer == null)
+ throw new NullPointerException("can't add null observer");
observers.add(observer);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Patch: FYI: fix PR classpath/23279,
Tom Tromey <=