Skip to content

Commit ba04f20

Browse files
committed
fire property change only if there are some listeners
1 parent d7e41fa commit ba04f20

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

visualvm/core/src/org/graalvm/visualvm/core/datasupport/AsyncPropertyChangeSupport.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,14 @@ public void firePropertyChange(final PropertyChangeEvent evt) {
6666
if (evt == null) {
6767
throw new NullPointerException();
6868
}
69-
executor.submit(new Runnable() {
69+
if (getPropertyChangeListeners().length>0) {
70+
executor.submit(new Runnable() {
7071

71-
public void run() {
72-
AsyncPropertyChangeSupport.super.firePropertyChange(evt);
73-
}
74-
});
72+
public void run() {
73+
AsyncPropertyChangeSupport.super.firePropertyChange(evt);
74+
}
75+
});
76+
}
7577
}
7678

7779
}

0 commit comments

Comments
 (0)