From e79d63c6925f9cc469939b94e17ca318bc9968f9 Mon Sep 17 00:00:00 2001 From: "erwan.serandour" Date: Mon, 16 Dec 2024 16:41:43 +0100 Subject: [PATCH 1/2] Update rule description to add javax persistence annotations and jakarta inject and resource annotation --- rules/S3749/java/rule.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rules/S3749/java/rule.adoc b/rules/S3749/java/rule.adoc index dbced7a406f..6fde3ca43b5 100644 --- a/rules/S3749/java/rule.adoc +++ b/rules/S3749/java/rule.adoc @@ -8,6 +8,10 @@ This rule raises an issue when a singleton ``++@Component++``, ``++@Controller++ * ``++org.springframework.beans.factory.annotation.Value++`` * ``++javax.annotation.Inject++`` * ``++javax.annotation.Resource++`` +* ``++javax.persistence.PersistenceContext++`` +* ``++jakarta.persistence.PersistenceContext++`` +* ``++jakarta.inject.Inject++`` +* ``++jakarta.annotation.Resource++`` == How to fix it From c2ba5d8fa7bce2c0ecf07fff841cc5510e15921e Mon Sep 17 00:00:00 2001 From: "erwan.serandour" Date: Mon, 16 Dec 2024 17:32:56 +0100 Subject: [PATCH 2/2] update after code review --- rules/S3749/java/rule.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/S3749/java/rule.adoc b/rules/S3749/java/rule.adoc index 6fde3ca43b5..525e6e025e1 100644 --- a/rules/S3749/java/rule.adoc +++ b/rules/S3749/java/rule.adoc @@ -9,9 +9,9 @@ This rule raises an issue when a singleton ``++@Component++``, ``++@Controller++ * ``++javax.annotation.Inject++`` * ``++javax.annotation.Resource++`` * ``++javax.persistence.PersistenceContext++`` -* ``++jakarta.persistence.PersistenceContext++`` -* ``++jakarta.inject.Inject++`` * ``++jakarta.annotation.Resource++`` +* ``++jakarta.inject.Inject++`` +* ``++jakarta.persistence.PersistenceContext++`` == How to fix it