mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-06 01:58:24 +00:00
allowDuplicates will always be false at that point
This commit is contained in:
parent
5637a5204f
commit
0611710c61
@ -197,7 +197,7 @@ public void addListener(final L listener, boolean allowDuplicate) {
|
|||||||
Validate.notNull(listener, "Listener object cannot be null.");
|
Validate.notNull(listener, "Listener object cannot be null.");
|
||||||
if (allowDuplicate) {
|
if (allowDuplicate) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
} else if (!allowDuplicate && !listeners.contains(listener)) {
|
} else if (!listeners.contains(listener)) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user