Do not use NPE for consistency checks 66/100766/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 24 Apr 2022 08:37:29 +0000 (10:37 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 24 Apr 2022 08:37:29 +0000 (10:37 +0200)
commit8ca42ed047eae6e0407f2cca661b3f51dba7e219
tree8bb213edfba641d8e0271b0f7989b808eb837aa4
parent7ca786c387d769ee9b4db41446052646ed85bf32
Do not use NPE for consistency checks

We are using Preconditions.checkNotNull() when guarding against illegal
state. Improve this by using verifyNotNull(), which results in
VerifyException, making the intent clearer.

Also migrate a verify(foo != null) to a proper verifyNotNull(), using
the resoluting value.

Change-Id: I2689852d396315714f126743b70469ceef75ce45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadOnlyProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadWriteProxyTransaction.java