Use compareAndExchange() to set closeFuture 50/109250/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 9 Dec 2023 10:51:14 +0000 (11:51 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 9 Dec 2023 10:51:14 +0000 (11:51 +0100)
commitb61b30a4b2be38c8629bf9c5d66d05609db3be1c
treeebe18180a32917a0a0e700d64d2428a1cc833584
parent719dc36d45a6d6e9aa9be5cdf99914d8ebcdf99c
Use compareAndExchange() to set closeFuture

Java 9+ gives us a convenient way to ensure null-safety in this CAS
operation -- compareAndExchange() returns the witness value, i.e.
we get the value instead of a plain boolean false.

Change-Id: I636b0f084170d42bbd99490577917afefe5145e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
singleton-service/mdsal-singleton-dom-impl/src/main/java/org/opendaylight/mdsal/singleton/dom/impl/ActiveServiceGroup.java