Fix another state-keeping thinko 11/101411/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 31 May 2022 18:54:42 +0000 (20:54 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 1 Jun 2022 13:40:34 +0000 (15:40 +0200)
commitaf0561e378fa806ecfd61c4a0f850b8123c1af15
treed65bd7b685326ecb56b0d4682969251e48312f6c
parenta69814dc4e8e0c83961cd962b64d75dd6d071999
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>
(cherry picked from commit d1a112edda4fa487522010a6330f67defe6359a4)
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/NetconfSessionPromise.java