# \#java

**URL:** https://community.sonarsource.com/tag/java/20.md

[Latest](https://community.sonarsource.com/latest.md) · [Categories](https://community.sonarsource.com/categories.md) · [Tags](https://community.sonarsource.com/tags.md)

---

## [False Negative - Java - Unused import:S1128 - When Using Lombok Builder @Builder(toBuilder=true)](https://community.sonarsource.com/t/false-negative-java-unused-import-s1128-when-using-lombok-builder-builder-tobuilder-true/191421)

<div class="topic-metadata">

**Author:** [@Tim\_de\_Jong](https://community.sonarsource.com/u/Tim_de_Jong)\
**Replies:** 1\
**Last updated:** [November 24, 2026, 3:48pm UTC](https://community.sonarsource.com/t/false-negative-java-unused-import-s1128-when-using-lombok-builder-builder-tobuilder-true/191421 "2026-11-24T15:48:53Z")

</div>

Environment Language: Java 25 Lombok: 1.18.46 Rule: False negative S1128 - Unused import Build system: Gradle (multi-module project) Product SonarQube Community - v26.6.0.123539 Decription When using @Builder(toBuild…

---

## [Security Advisory: Java4Shell workaround for SonarQube](https://community.sonarsource.com/t/security-advisory-java4shell-workaround-for-sonarqube/191330)

<div class="topic-metadata">

**Author:** [@stevan.vanderwerf](https://community.sonarsource.com/u/stevan.vanderwerf)\
**Replies:** 8\
**Last updated:** [November 23, 2026, 4:30pm UTC](https://community.sonarsource.com/t/security-advisory-java4shell-workaround-for-sonarqube/191330 "2026-11-23T16:30:08Z")

</div>

Update 20 November 2026 SonarQube MCP Server If you have enabled SonarQube MCP Server, apply the workaround to its JVM as well. JVM options configured for SonarQube Server do not automatically apply to the separate MCP c…

---

## [java:S3749 false positive when the injection constructor delegates with "this(...)"](https://community.sonarsource.com/t/java-s3749-false-positive-when-the-injection-constructor-delegates-with-this/190342)

<div class="topic-metadata">

**Author:** [@nallen20](https://community.sonarsource.com/u/nallen20)\
**Replies:** 1\
**Last updated:** [November 20, 2026, 12:17pm UTC](https://community.sonarsource.com/t/java-s3749-false-positive-when-the-injection-constructor-delegates-with-this/190342 "2026-11-20T12:17:32Z")

</div>

What language is this for? Java Which rule? java:S3749, Members of Spring components should be injected Why do you believe it’s a false-positive? S3749 treats a field as injected when its identifier appears in the bod…

---

## [Property sonar.qualitygate.ignoreSmallChanges not applied](https://community.sonarsource.com/t/property-sonar-qualitygate-ignoresmallchanges-not-applied/138223)

<div class="topic-metadata">

**Author:** [@emanuelteixeira](https://community.sonarsource.com/u/emanuelteixeira)\
**Replies:** 11\
**Last updated:** [November 20, 2026, 10:01am UTC](https://community.sonarsource.com/t/property-sonar-qualitygate-ignoresmallchanges-not-applied/138223 "2026-11-20T10:01:30Z")

</div>

Hi Team, I need a confirmation and help. I have used the property sonar.qualitygate.ignoreSmallChanges in the pom.xml or command line with -Dsonar.qualitygate.ignoreSmallChanges=false and seems it not applying. But, if…

---

## [False-Positive Rule java:S6665 (Redundant nullability annotations should be removed)](https://community.sonarsource.com/t/false-positive-rule-java-s6665-redundant-nullability-annotations-should-be-removed/191314)

<div class="topic-metadata">

**Author:** [@Nicolas](https://community.sonarsource.com/u/Nicolas)\
**Replies:** 1\
**Last updated:** [November 19, 2026, 3:51pm UTC](https://community.sonarsource.com/t/false-positive-rule-java-s6665-redundant-nullability-annotations-should-be-removed/191314 "2026-11-19T15:51:42Z")

</div>

Make sure to read this post before raising a thread here: Language: Java rule ID: java:S6665 (Redundant nullability annotations should be removed) SonarQube Server Community Edition Version: v26.10.0.133078 SonarQu…

---

## [False Positive: Rule java:S8696 flags standard java.time enums (DayOfWeek, Month, ChronoUnit)](https://community.sonarsource.com/t/false-positive-rule-java-s8696-flags-standard-java-time-enums-dayofweek-month-chronounit/190327)

<div class="topic-metadata">

**Author:** [@jmacwork](https://community.sonarsource.com/u/jmacwork)\
**Replies:** 1\
**Last updated:** [November 17, 2026, 12:57pm UTC](https://community.sonarsource.com/t/false-positive-rule-java-s8696-flags-standard-java-time-enums-dayofweek-month-chronounit/190327 "2026-11-17T12:57:44Z")

</div>

What language is this for? Java Which rule? java:S8696 (“Reference equality should not be used with value-based classes”) Why do you believe it’s a false-positive? The rule triggers a false positive when comparing stan…

---

## [False positive for Java requireNonNullElse and S2259](https://community.sonarsource.com/t/false-positive-for-java-requirenonnullelse-and-s2259/191019)

<div class="topic-metadata">

**Author:** [@osmundf](https://community.sonarsource.com/u/osmundf)\
**Replies:** 5\
**Last updated:** [November 13, 2026, 3:25pm UTC](https://community.sonarsource.com/t/false-positive-for-java-requirenonnullelse-and-s2259/191019 "2026-11-13T15:25:43Z")

</div>

SonarQube for IDE (IntelliJ Plugin) v12.5.0.84934 SonarQube is deployed with the IDE IntelliJ IDEA 2026.2.4 (MacOS) I want my source code to pass with zero SonarQube based warnings/errors. When I have code that has the…

---

## [Automatically Apply JaCoCo Exclusions Defined in pom.xml](https://community.sonarsource.com/t/automatically-apply-jacoco-exclusions-defined-in-pom-xml/191020)

<div class="topic-metadata">

**Author:** [@SBR777](https://community.sonarsource.com/u/SBR777)\
**Replies:** 2\
**Last updated:** [November 12, 2026, 11:11am UTC](https://community.sonarsource.com/t/automatically-apply-jacoco-exclusions-defined-in-pom-xml/191020 "2026-11-12T11:11:15Z")

</div>

When importing Java code coverage reports, SonarScanner should parse the project’s pom.xml and automatically apply exclusions configured in jacoco-maven-plugin. Currently, exclusions configured in JaCoCo, for example: x…

---

## [False positive java:S1172: a method with an empty body is reported when the class is final](https://community.sonarsource.com/t/false-positive-java-a-method-with-an-empty-body-is-reported-when-the-class-is-final/190822)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 1\
**Last updated:** [November 12, 2026, 10:38am UTC](https://community.sonarsource.com/t/false-positive-java-a-method-with-an-empty-body-is-reported-when-the-class-is-final/190822 "2026-11-12T10:38:15Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1172 Issue: The rule description exempts unused parameters “in non-private metho…

---

## [FP: S1105 on generic record whose component list spans several lines](https://community.sonarsource.com/t/fp-s1105-on-generic-record-whose-component-list-spans-several-lines/190806)

<div class="topic-metadata">

**Author:** [@lrozenblyum](https://community.sonarsource.com/u/lrozenblyum)\
**Replies:** 1\
**Last updated:** [November 12, 2026, 10:17am UTC](https://community.sonarsource.com/t/fp-s1105-on-generic-record-whose-component-list-spans-several-lines/190806 "2026-11-12T10:17:48Z")

</div>

What language is this for? Java Which rule? java:S1105 (Move this left curly brace to the end of previous line of code) Why do you believe it’s a false-positive/false-negative? The left curly brace is already in the en…

---

## [Javabugs \[dbd\] sensor OutOfMemoryError on branch analysis after upgrading 2026.4.1 → 2026.5.3](https://community.sonarsource.com/t/javabugs-dbd-sensor-outofmemoryerror-on-branch-analysis-after-upgrading-2026-4-1-2026-5-3/190864)

<div class="topic-metadata">

**Author:** [@andrew-garland](https://community.sonarsource.com/u/andrew-garland)\
**Replies:** 2\
**Last updated:** [November 10, 2026, 4:13pm UTC](https://community.sonarsource.com/t/javabugs-dbd-sensor-outofmemoryerror-on-branch-analysis-after-upgrading-2026-4-1-2026-5-3/190864 "2026-11-10T16:13:04Z")

</div>

Must-share information SonarQube Server: Enterprise 2026.5.3.133540, upgraded on 2026-11-01 from Developer 2026.4.1.126914 (the edition changed at the same time: Developer → Enterprise) Deployment: Docker (official sona…

---

## [java:S1121: the description exempts assignments in comparisons, the check only exempts \`=\`](https://community.sonarsource.com/t/java-the-description-exempts-assignments-in-comparisons-the-check-only-exempts/190820)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 3, 2026, 4:07pm UTC](https://community.sonarsource.com/t/java-the-description-exempts-assignments-in-comparisons-the-check-only-exempts/190820 "2026-11-03T16:07:17Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1121 Issue: The Exceptions section…

---

## [java:S1144: renaming an annotation type changes whether an unused private method is reported](https://community.sonarsource.com/t/java-renaming-an-annotation-type-changes-whether-an-unused-private-method-is-reported/190819)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 3, 2026, 4:06pm UTC](https://community.sonarsource.com/t/java-renaming-an-annotation-type-changes-whether-an-unused-private-method-is-reported/190819 "2026-11-03T16:06:47Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1144 Issue: The two files only differ in the name of a user annotation type: @in…

---

## [False negative java:S1170: final field initialised with a constant not reported inside an enum](https://community.sonarsource.com/t/false-negative-java-final-field-initialised-with-a-constant-not-reported-inside-an-enum/190818)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 3, 2026, 4:06pm UTC](https://community.sonarsource.com/t/false-negative-java-final-field-initialised-with-a-constant-not-reported-inside-an-enum/190818 "2026-11-03T16:06:31Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1170 Issue: S1170 reports public f…

---

## [False negative java:S1068: an unused private field declared in an enum is not reported](https://community.sonarsource.com/t/false-negative-java-an-unused-private-field-declared-in-an-enum-is-not-reported/190817)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 3, 2026, 4:06pm UTC](https://community.sonarsource.com/t/false-negative-java-an-unused-private-field-declared-in-an-enum-is-not-reported/190817 "2026-11-03T16:06:08Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1068 Issue: S1068 reports private …

---

## [False negative java:S1643: concatenation inside a forEach lambda not reported](https://community.sonarsource.com/t/false-negative-java-concatenation-inside-a-foreach-lambda-not-reported/190816)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 3, 2026, 4:05pm UTC](https://community.sonarsource.com/t/false-negative-java-concatenation-inside-a-foreach-lambda-not-reported/190816 "2026-11-03T16:05:46Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1643 Issue: seed/LogBuilder.java a…

---

## [False negative java:S1643: concatenation in a loop missed when the field is written \`this.field\`](https://community.sonarsource.com/t/false-negative-java-concatenation-in-a-loop-missed-when-the-field-is-written-this-field/190815)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 3, 2026, 4:05pm UTC](https://community.sonarsource.com/t/false-negative-java-concatenation-in-a-loop-missed-when-the-field-is-written-this-field/190815 "2026-11-03T16:05:10Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1643 Issue: S1643 reports logState…

---

## [False negative java:S3824: the Map.get null test is not reported when written \`!(value != null)\`](https://community.sonarsource.com/t/false-negative-java-the-map-get-null-test-is-not-reported-when-written-value-null/190799)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 1\
**Last updated:** [November 3, 2026, 2:57pm UTC](https://community.sonarsource.com/t/false-negative-java-the-map-get-null-test-is-not-reported-when-written-value-null/190799 "2026-11-03T14:57:36Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S3824 Issue: S3824 wants a Map.get(…

---

## [False negative java:S2259: nothing analysed after a try-finally that ends with another try-finally](https://community.sonarsource.com/t/false-negative-java-nothing-analysed-after-a-try-finally-that-ends-with-another-try-finally/190765)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 1\
**Last updated:** [November 3, 2026, 8:26am UTC](https://community.sonarsource.com/t/false-negative-java-nothing-analysed-after-a-try-finally-that-ends-with-another-try-finally/190765 "2026-11-03T08:26:09Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177, javasymbolicexecution 8.16.4.1912); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S2…

---

## [False negative java:S1185: super-only override not reported when the call is parenthesised](https://community.sonarsource.com/t/false-negative-java-super-only-override-not-reported-when-the-call-is-parenthesised/190797)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 2, 2026, 5:02pm UTC](https://community.sonarsource.com/t/false-negative-java-super-only-override-not-reported-when-the-call-is-parenthesised/190797 "2026-11-02T17:02:45Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1185 Issue: Example.getId() in see…

---

## [False negative java:S3012: array copy loop not reported when the copied element is parenthesised](https://community.sonarsource.com/t/false-negative-java-array-copy-loop-not-reported-when-the-copied-element-is-parenthesised/190794)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 0\
**Last updated:** [November 2, 2026, 5:02pm UTC](https://community.sonarsource.com/t/false-negative-java-array-copy-loop-not-reported-when-the-copied-element-is-parenthesised/190794 "2026-11-02T17:02:05Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177); also 26.7.0.124771 (sonar-java 8.34.0.44906), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S3012 Issue: S3012 reports for (int…

---

## [False negative java:S1854: a dead store inside a lambda body is not reported](https://community.sonarsource.com/t/false-negative-java-a-dead-store-inside-a-lambda-body-is-not-reported/190767)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 1\
**Last updated:** [November 2, 2026, 3:34pm UTC](https://community.sonarsource.com/t/false-negative-java-a-dead-store-inside-a-lambda-body-is-not-reported/190767 "2026-11-02T15:34:43Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S1854 Issue: S1854 reports int x = compute(); x = 3; System.out.println(x); in a …

---

## [False negative java:S2168: not reported when the outer null check is written \`!(helper != null)\`](https://community.sonarsource.com/t/false-negative-java-not-reported-when-the-outer-null-check-is-written-helper-null/190766)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 1\
**Last updated:** [November 2, 2026, 1:12pm UTC](https://community.sonarsource.com/t/false-negative-java-not-reported-when-the-outer-null-check-is-written-helper-null/190766 "2026-11-02T13:12:01Z")

</div>

Product/version: SonarQube Community Build 26.7.0.124771, sonar-scanner 8.1.0.6389 Language: Java Rule: java:S2168 Issue: S2168 reports the double-checked locking on the non-volatile field helper in seed/Dcl.java. In…

---

## [False negative java:S3626: a redundant return inside a lambda body is not reported](https://community.sonarsource.com/t/false-negative-java-a-redundant-return-inside-a-lambda-body-is-not-reported/190777)

<div class="topic-metadata">

**Author:** [@MarkLee131](https://community.sonarsource.com/u/MarkLee131)\
**Replies:** 1\
**Last updated:** [November 2, 2026, 10:58am UTC](https://community.sonarsource.com/t/false-negative-java-a-redundant-return-inside-a-lambda-body-is-not-reported/190777 "2026-11-02T10:58:58Z")

</div>

Product/version: SonarQube Community Build 26.9.0.129388 (sonar-java 8.41.0.47177), sonar-scanner 8.1.0.6389 Language: Java Rule: java:S3626 Issue: S3626 reports the return; at the end of run(int x) { System.out.prin…

---

## [SonarQube for IDE creates .sonar/spring-context-model.json in every analyzed module in Eclipse](https://community.sonarsource.com/t/sonarqube-for-ide-creates-sonar-spring-context-model-json-in-every-analyzed-module-in-eclipse/190547)

<div class="topic-metadata">

**Author:** [@lrozenblyum](https://community.sonarsource.com/u/lrozenblyum)\
**Replies:** 6\
**Last updated:** [October 29, 2026, 8:57am UTC](https://community.sonarsource.com/t/sonarqube-for-ide-creates-sonar-spring-context-model-json-in-every-analyzed-module-in-eclipse/190547 "2026-10-29T08:57:34Z")

</div>

Operating system: Windows 10 Pro (10.0.19045) IDE name and version: Eclipse IDE 2026-06 SonarQube for Eclipse plugin version: 13.2.0.84960 Programming language you’re coding in: Java (multi-module Maven project, Spring …

---

## [javabugs:S3655 FN with HPA/Hibernate](https://community.sonarsource.com/t/javabugs-s3655-fn-with-hpa-hibernate/190395)

<div class="topic-metadata">

**Author:** [@CLewellyn](https://community.sonarsource.com/u/CLewellyn)\
**Replies:** 3\
**Last updated:** [October 29, 2026, 8:00am UTC](https://community.sonarsource.com/t/javabugs-s3655-fn-with-hpa-hibernate/190395 "2026-10-29T08:00:32Z")

</div>

Make sure to read this post before raising a thread here: Environment SonarQube Server: Data Center Edition, v2026.5.2 (132813) SonarQube for IntelliJ: 13.0.0 IntelliJ IDEA: 2026.1.2 JDK: Amazon Corretto 25 (sonar.j…

---

## [Unexpected finding: java:S2638](https://community.sonarsource.com/t/unexpected-finding-java-s2638/190309)

<div class="topic-metadata">

**Author:** [@RichardWith](https://community.sonarsource.com/u/RichardWith)\
**Replies:** 1\
**Last updated:** [October 21, 2026, 2:58pm UTC](https://community.sonarsource.com/t/unexpected-finding-java-s2638/190309 "2026-10-21T14:58:37Z")

</div>

Community Build v26.4.0.121862 Language: Java 25 Problem: java:S2638 occurs without any known reason package sampleS2638; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable;…

---

## [Java: S5128 reports missing @Valid despite validation on interface](https://community.sonarsource.com/t/java-s5128-reports-missing-valid-despite-validation-on-interface/190276)

<div class="topic-metadata">

**Author:** [@sebastianhaeni](https://community.sonarsource.com/u/sebastianhaeni)\
**Replies:** 1\
**Last updated:** [October 20, 2026, 11:51am UTC](https://community.sonarsource.com/t/java-s5128-reports-missing-valid-despite-validation-on-interface/190276 "2026-10-20T11:51:16Z")

</div>

SonarCloud reports missing @Valid annotations on both a controller implementation’s request parameter and a converter’s parameter, although validation is already configured at the HTTP boundary. The following is a simpl…

---

## [False-Positive: reports javabugs:S2259 on object that can't be null](https://community.sonarsource.com/t/false-positive-reports-javabugs-s2259-on-object-that-cant-be-null/189147)

<div class="topic-metadata">

**Author:** [@blazkosi](https://community.sonarsource.com/u/blazkosi)\
**Replies:** 3\
**Last updated:** [October 8, 2026, 1:15pm UTC](https://community.sonarsource.com/t/false-positive-reports-javabugs-s2259-on-object-that-cant-be-null/189147 "2026-10-08T13:15:18Z")

</div>

Language: Java 25 Rule: javabugs:S2259 - A NULL object should not be accessed Version: SonarQube Server, Developer Edition, v2026.5 (132435) Cannot reproduce with SonarQube for IDE Why is it a False-Positive: Because…

---

## [False negative about the security rule S5542](https://community.sonarsource.com/t/false-negative-about-the-security-rule-s5542/146481)

<div class="topic-metadata">

**Author:** [@Belle](https://community.sonarsource.com/u/Belle)\
**Replies:** 1\
**Last updated:** [October 1, 2026, 1:14pm UTC](https://community.sonarsource.com/t/false-negative-about-the-security-rule-s5542/146481 "2026-10-01T13:14:08Z")

</div>

Langauge: Java Rule: S5542 SonarQube version: 25.6.0.109173 Hi, I used SonarQube to detect S5542 bugs, and found a false negative. The minimized code example is provided below. SonarQube should report this type of war…

[Next page](https://community.sonarsource.com/tag/java/20.md?match_all_tags=true&page=1&tags%5B%5D=java)
