From bcd4ca910ce0b478fdb1f382baf71a162c294084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Sat, 17 Oct 2026 10:44:36 +0200 Subject: [PATCH] fix(xtext): extend the counter warning suppression to removeMappings' visitor SpotBugs 4.10.5 reports AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE for size-- in QualifiedNameSegmentTreeLookup.removeMappings. removeMappings already suppresses it, as get() does for hits and misses, because the lookup accepts approximate counters; 4.10.5 attributes the decrement to the anonymous Visitor's visit(), which the outer annotation doesn't cover. Annotate visit() the same way. A full-reactor run of SpotBugs 4.10.5 reports no other finding, so this unblocks the SpotBugs bump (#1572). Bump the bundle to 17.4.3, since 17.4.2 was released in 19.3.0. Co-Authored-By: Claude Opus 5.5 --- com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF | 2 +- com.avaloq.tools.ddk.xtext/pom.xml | 2 +- .../tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF index 5e0b4d08c..034686034 100644 --- a/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.avaloq.tools.ddk.xtext Bundle-SymbolicName: com.avaloq.tools.ddk.xtext;singleton:=true -Bundle-Version: 17.4.2.qualifier +Bundle-Version: 17.4.3.qualifier Bundle-Vendor: Avaloq Group AG Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-ActivationPolicy: lazy diff --git a/com.avaloq.tools.ddk.xtext/pom.xml b/com.avaloq.tools.ddk.xtext/pom.xml index b5e1975c1..7bb4038c0 100644 --- a/com.avaloq.tools.ddk.xtext/pom.xml +++ b/com.avaloq.tools.ddk.xtext/pom.xml @@ -6,7 +6,7 @@ 18.0.1-SNAPSHOT ../ddk-parent - 17.4.2-SNAPSHOT + 17.4.3-SNAPSHOT com.avaloq.tools.ddk com.avaloq.tools.ddk.xtext eclipse-plugin diff --git a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java index 5ac28a491..ad211998e 100644 --- a/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java +++ b/com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/naming/QualifiedNameSegmentTreeLookup.java @@ -543,6 +543,7 @@ public Collection get(final QualifiedName name) { public void removeMappings(final T value) { root.accept(new Visitor() { @Override + @SuppressFBWarnings({"AT_NONATOMIC_64BIT_PRIMITIVE", "AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE"}) void visit(final SegmentNode node) { Object[] newValues = ArrayUtils.remove(node.values, value); if (newValues != node.values) {