diff --git a/its/ruling/src/test/java/org/sonar/java/it/AutoScanTest.java b/its/ruling/src/test/java/org/sonar/java/it/AutoScanTest.java
index c5587a5e2ff..c544e87874c 100644
--- a/its/ruling/src/test/java/org/sonar/java/it/AutoScanTest.java
+++ b/its/ruling/src/test/java/org/sonar/java/it/AutoScanTest.java
@@ -188,7 +188,7 @@ public void javaCheckTestSources() throws Exception {
* No differences would mean that we find the same issues with and without the bytecode and libraries
*/
String differences = Files.readString(pathFor(TARGET_ACTUAL + PROJECT_KEY + "-no-binaries_differences"));
- assertThat(differences).isEqualTo("Issues differences: 3254");
+ assertThat(differences).isEqualTo("Issues differences: 3294");
}
private static Path pathFor(String path) {
diff --git a/its/ruling/src/test/resources/autoscan/autoscan-diff-by-rules.json b/its/ruling/src/test/resources/autoscan/autoscan-diff-by-rules.json
index 58a0998f703..87526dce847 100644
--- a/its/ruling/src/test/resources/autoscan/autoscan-diff-by-rules.json
+++ b/its/ruling/src/test/resources/autoscan/autoscan-diff-by-rules.json
@@ -302,7 +302,7 @@
{
"ruleKey": "S1161",
"hasTruePositives": true,
- "falseNegatives": 6,
+ "falseNegatives": 7,
"falsePositives": 0
},
{
@@ -338,7 +338,7 @@
{
"ruleKey": "S1172",
"hasTruePositives": true,
- "falseNegatives": 11,
+ "falseNegatives": 13,
"falsePositives": 0
},
{
@@ -698,7 +698,7 @@
{
"ruleKey": "S1874",
"hasTruePositives": true,
- "falseNegatives": 89,
+ "falseNegatives": 102,
"falsePositives": 0
},
{
@@ -974,7 +974,7 @@
{
"ruleKey": "S2160",
"hasTruePositives": true,
- "falseNegatives": 0,
+ "falseNegatives": 1,
"falsePositives": 0
},
{
@@ -1322,7 +1322,7 @@
{
"ruleKey": "S2637",
"hasTruePositives": true,
- "falseNegatives": 19,
+ "falseNegatives": 21,
"falsePositives": 0
},
{
@@ -1610,7 +1610,7 @@
{
"ruleKey": "S3330",
"hasTruePositives": true,
- "falseNegatives": 30,
+ "falseNegatives": 51,
"falsePositives": 0
},
{
diff --git a/java-checks-test-sources/pom.xml b/java-checks-test-sources/pom.xml
index fe524eddeca..3bedb4d89cf 100644
--- a/java-checks-test-sources/pom.xml
+++ b/java-checks-test-sources/pom.xml
@@ -386,6 +386,18 @@
jar
provided
+
+ jakarta.ws.rs
+ jakarta.ws.rs-api
+ 3.1.0
+ provided
+
+
+ jakarta.servlet
+ jakarta.servlet-api
+ 6.0.0
+ provided
+
javax.inject
javax.inject
diff --git a/java-checks-test-sources/src/main/files/non-compiling/checks/security/CookieHttpOnlyCheck.java b/java-checks-test-sources/src/main/files/non-compiling/checks/security/CookieHttpOnlyCheck.java
index 72c8d403454..5e8f3e83e62 100644
--- a/java-checks-test-sources/src/main/files/non-compiling/checks/security/CookieHttpOnlyCheck.java
+++ b/java-checks-test-sources/src/main/files/non-compiling/checks/security/CookieHttpOnlyCheck.java
@@ -83,3 +83,43 @@ void baw() {
Unknown.unkown(() -> { Class v = unknown(); });
}
}
+
+class JakartaCookieHttpOnlyCheck {
+
+ jakarta.servlet.http.Cookie field4;
+ jakarta.servlet.http.Cookie field6;
+
+ void servletCookie(boolean param, jakarta.servlet.http.Cookie c0) {
+ field6.setHttpOnly(false); // Noncompliant
+
+ jakarta.servlet.http.Cookie c7 = new UnknownCookie("name", "value"); // Noncompliant
+ Object c8 = new jakarta.servlet.http.Cookie("name", "value"); // Noncompliant
+
+ jakarta.servlet.http.Cookie c13;
+ c13 = new UnknownCookie("name", "value"); // Noncompliant
+
+ field4 = new jakarta.servlet.http.Cookie("name, value"); // FN
+ }
+
+ jakarta.servlet.http.Cookie getC0() {
+ return new UnknownCookie("name", "value"); // FN
+ }
+
+ void compliant(jakarta.ws.rs.core.Cookie c) {
+ c.isHttpOnly();
+ }
+}
+
+class JakartaCookieHttpOnlyCheckCookie extends jakarta.servlet.http.Cookie {
+ public jakarta.servlet.http.Cookie c;
+ public void setHttpOnly(boolean isHttpOnly) { }
+ void foo() {
+ setHttpOnly(false); // Noncompliant
+ }
+ void bar(boolean x) {
+ setHttpOnly(x);
+ }
+ void baz() {
+ setHttpOnly(true);
+ }
+}
diff --git a/java-checks-test-sources/src/main/java/annotations/nullability/no_default/JakartaNullabilityAnnotation.java b/java-checks-test-sources/src/main/java/annotations/nullability/no_default/JakartaNullabilityAnnotation.java
new file mode 100644
index 00000000000..2769bfae648
--- /dev/null
+++ b/java-checks-test-sources/src/main/java/annotations/nullability/no_default/JakartaNullabilityAnnotation.java
@@ -0,0 +1,11 @@
+package annotations.nullability.no_default;
+
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
+
+public class JakartaNullabilityAnnotation {
+ @Nullable
+ Object id9002_type_WEAK_NULLABLE_level_VARIABLE;
+ @Nonnull
+ Object id9003_type_NON_NULL_level_VARIABLE;
+}
diff --git a/java-checks-test-sources/src/main/java/checks/LeastSpecificTypeCheck.java b/java-checks-test-sources/src/main/java/checks/LeastSpecificTypeCheck.java
index e9894414697..30ddcb0a614 100644
--- a/java-checks-test-sources/src/main/java/checks/LeastSpecificTypeCheck.java
+++ b/java-checks-test-sources/src/main/java/checks/LeastSpecificTypeCheck.java
@@ -90,6 +90,33 @@ public void autowiredMethod3(List