diff options
author | Paul Fisher <rao@gnu.org> | 2000-03-15 21:33:36 +0000 |
---|---|---|
committer | Paul Fisher <rao@gnu.org> | 2000-03-15 21:33:36 +0000 |
commit | 6af7b80f2beeb8719111943199731dfd9dfb7f5d (patch) | |
tree | 430f3d38af1ddd63e598979224c813714f7b894f /java/util/Observable.java | |
parent | a982c170976d65285bfa4a7e501c6b23f735bff8 (diff) | |
download | classpath-6af7b80f2beeb8719111943199731dfd9dfb7f5d.tar.gz |
(notifyObservers): Use hasChanged and clearChanged.
Diffstat (limited to 'java/util/Observable.java')
-rw-r--r-- | java/util/Observable.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/java/util/Observable.java b/java/util/Observable.java index 1a57865ed..d3863118b 100644 --- a/java/util/Observable.java +++ b/java/util/Observable.java @@ -107,13 +107,13 @@ public class Observable */ public void notifyObservers (Object obj) { - if (!changed) return; + if (!hasChanged ()) return; Vector ob1 = (Vector) observers.clone (); for (int i = 0; i < ob1.size (); i++) ((Observer)ob1.elementAt (i)).update (this, obj); - changed = false; + clearChanged (); } /** @@ -124,4 +124,3 @@ public class Observable changed = true; } } - |