mirror of https://github.com/apache/nifi.git
NIFI-13682 Fixed Flow Versioning when changing Label styles (#9526)
Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
b623ccc7fe
commit
3fd3957b83
|
@ -29,8 +29,8 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class StandardLabel implements Label {
|
||||
public static final long DEFAULT_Z_INDEX = 0;
|
||||
|
@ -112,10 +112,7 @@ public class StandardLabel implements Label {
|
|||
if (style != null) {
|
||||
boolean updated = false;
|
||||
while (!updated) {
|
||||
final Map<String, String> existingStyles = this.style.get();
|
||||
final Map<String, String> updatedStyles = new HashMap<>(existingStyles);
|
||||
updatedStyles.putAll(style);
|
||||
updated = this.style.compareAndSet(existingStyles, Collections.unmodifiableMap(updatedStyles));
|
||||
updated = this.style.compareAndSet(this.style.get(), Collections.unmodifiableMap(style));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue