Fix another state-keeping thinko 80/101380/6
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 31 May 2022 18:54:42 +0000 (20:54 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 31 May 2022 20:54:12 +0000 (22:54 +0200)
commitd1a112edda4fa487522010a6330f67defe6359a4
treec03ac87f54a5bd4c570fdbe9044ad07ef8575a02
parent5e9f3517718f4475c3026acba0a5afb6f19388fa
Fix another state-keeping thinko

We need to update pending before we add a listener, as the future
may have already completed and thus we could observe pending being
either null or point to the bad value.

Also update the corresponding checkState() to use identity comparison
and include a proper message.

JIRA: NETCONF-827
Change-Id: If79d7ce71480bab6b35eec6fab63671f949c6cf9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/NetconfSessionPromise.java