Do not instantiate a Consumer for registration 68/88168/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 29 Feb 2020 10:51:34 +0000 (11:51 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 29 Feb 2020 15:43:13 +0000 (16:43 +0100)
commit4050ec644fcd543e082bd3dd715670a5ed4a1c5d
tree4594d2283b8f640f626a0d323c5ab0b691e9468a
parent3ff7c30219041530941eceb69a7f1762ff9b982c
Do not instantiate a Consumer for registration

Taking a Consumer forces us to instantiate it to capture listeners
Set. We can do the same by simply moving the reference away. For
safety we only get a Collection<?>, for which remove(Object) is just
what we want.

Change-Id: I4f3bd473a75dabee1d1a31e10cf0fefe57c4896b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
common/util/src/main/java/org/opendaylight/yangtools/util/ListenerRegistry.java