Skip to content

Feature/sonarjava 2219 - Added another Annotation which was causing False Positives#1442

Closed
aepfli wants to merge 10 commits intoSonarSource:masterfrom
aepfli:feature/SONARJAVA-2219
Closed

Feature/sonarjava 2219 - Added another Annotation which was causing False Positives#1442
aepfli wants to merge 10 commits intoSonarSource:masterfrom
aepfli:feature/SONARJAVA-2219

Conversation

@aepfli
Copy link
Copy Markdown
Contributor

@aepfli aepfli commented May 11, 2017

Hey guys!

With my last commit i think we did miss on the @Value annotation. I added it with this Pull-Request, i think that is it, i checked the JSR-250 and spring annotation, and did not find another field-based injection annotation!

pasted image at 2017_05_10 11_10 pm

Br simon

PS: @m-g-sonar there is no internal ticket for now at your jira, so i reused the same number

Please ensure your pull request adheres to the following guidelines:

  • Use the following formatting style: SonarSource/sonar-developer-toolset
  • Unit tests are passing and you provided a unit test for your fix
  • ITs should pass : To run ITs locally, checkout the README of the project. - did not check
  • If there is a Jira ticket available, please make your commits and pull request start with the ticket number (SONARJAVA-XXXX)

Simon Schrottner added 10 commits April 5, 2017 10:27
 * added @resource as injection Annotation
 * skipped @Inject as imho with @Inject there would be more necessary
   checks, like the qualifier in the class etc.
 * fixing sonar issue regarding static
 * adding @value for checked Annotations
 * adding @component to check for in class, dont know if this will be enough if somebody implements their own @component Annotation
# Conflicts:
#	java-checks/src/main/java/org/sonar/java/checks/spring/SpringComponentWithNonAutowiredMembersCheck.java
#	java-checks/src/test/files/checks/spring/SpringComponentWithNonAutowiredMembersCheck.java
* added missing import for test files
* i definitly should run the tests locally.. but right now, nothing is set up, so i am sorry to miss use your infrastructure
@aepfli
Copy link
Copy Markdown
Contributor Author

aepfli commented May 11, 2017

hmm not sure why this is failing... mvn clean package is running through locally...
[INFO] Reactor Summary:
[INFO]
[INFO] SonarJava .......................................... SUCCESS [ 15.477 s]
[INFO] SonarQube Java :: Maven model generator ............ SUCCESS [ 13.582 s]
[INFO] SonarQube Java :: Front-end ........................ SUCCESS [01:28 min]
[INFO] SonarQube Java :: Check Test tool kit .............. SUCCESS [ 4.521 s]
[INFO] SonarQube Java :: Checks ........................... SUCCESS [ 35.895 s]
[INFO] SonarQube Java :: Surefire ......................... SUCCESS [ 3.240 s]
[INFO] java-jacoco-previous ............................... SUCCESS [ 1.948 s]
[INFO] SonarQube Java :: JaCoCo ........................... SUCCESS [ 3.714 s]
[INFO] SonarQube Java :: Plugin ........................... SUCCESS [ 7.577 s]
[INFO] SonarQube Java :: JaCoCo Listeners ................. SUCCESS [ 2.118 s]
[INFO] SonarQube Java :: ITs .............................. SUCCESS [ 0.020 s]
[INFO] SonarQube Java :: ITs :: Performancing ............. SUCCESS [ 9.855 s]
[INFO] SonarQube Java :: ITs :: Plugin .................... SUCCESS [ 0.020 s]
[INFO] SonarQube Java :: ITs :: Plugin :: Plugins ......... SUCCESS [ 0.017 s]
[INFO] SonarQube Java :: IT :: Plugins :: Java Extension Plugin SUCCESS [ 0.518 s]
[INFO] SonarQube Java :: ITs :: Plugin :: Tests ........... SUCCESS [ 7.316 s]
[INFO] SonarQube Java :: ITs :: Ruling .................... SUCCESS [ 1.092 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

@ghost
Copy link
Copy Markdown

ghost commented May 11, 2017

Hello @aepfli,

your branch is conflicting with our master branch. I squashed all your commits when merging your first PR. It's probably the cause of the issue. Please restarted from rebased master branch, and only add the new commit on top of it. It will make things clear for us.

I restarted Travis build. no idea why it failed.

@aepfli aepfli closed this May 11, 2017
@aepfli aepfli deleted the feature/SONARJAVA-2219 branch May 11, 2017 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant