Hello,
I have a Spring @Service Java class with 2 properties that are initialized by means of a @Value annotation. In the @Value annotation I specify a default value. However rule java:S1258 triggers, although I think it should not:
Message: “Add a constructor to the class, or provide default values”.
Is my understanding correct or does the rule raise a false-positive issue?
I am using:
- SonarQube for IDE 11.6.0.83783
- IntelliJ 2025.3
- Windows
- SonarQube Community v25.7.0.110598
