Do not instantiate a Consumer for registration 73/88173/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 29 Feb 2020 10:51:34 +0000 (11:51 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 2 Mar 2020 11:31:10 +0000 (12:31 +0100)
commit589682c342d5bba61da76775a5151baa40c4b3b7
tree0bfba943bfdb0e086d0aff296861a092dd0e80a7
parent1cf06f3e0280674773a2450f493d28b99c922c7f
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