My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 177: Maven checkersplugin result in compile errors despite using "-Awarns" flag
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Closed:  Feb 2013

Sign in to add a comment
Reported by, Nov 19, 2012
What steps will reproduce the problem?

1. Add the following configuration to maven project pom.xml

      <javacParams>-Awarns -Xmaxwarns 10000</javacParams>

2. Make sure that there is at least one concern in the Java code that will be caught by the Checker Framework.

3. Execute "mvn test"

What is the expected output? 

The project should build successfully with compiler warnings for the problems that are detected by the Checker Framework.

What do you see instead?

[INFO] --- checkersplugin:0.4:check (default) @ inject ---
[INFO] Running JSR308 checkers version: 1.4.3
[INFO] Running processor(s): checkers.interning.InterningChecker,checkers.nullness.NullnessChecker
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] Test Project ....................................... FAILURE [3.018s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal types.checkers:checkersplugin:0.4:check (default) on project inject: error: Unexpected InvocationTargetException for class name checkers.interning.InterningVisitor when invoking the constructor; parameter types: [class checkers.interning.InterningChecker, interface com.sun.source.tree.CompilationUnitTree] -> [Help 1]

What version of the product are you using? On what operating system?



Java: 1.7.0_09
Mac OS X: 10.8.2

Please provide any additional information below.
Nov 19, 2012
Project Member #1
I have reproduced this with the code sent to Werner.  I am looking into it now.
Status: Accepted
Dec 5, 2012
Project Member #2
(No comment was entered for this change.)
Status: Started
Dec 5, 2012
Project Member #3
(No comment was entered for this change.)
Feb 26, 2013
Project Member #4
(No comment was entered for this change.)
Labels: Maven
Feb 26, 2013
Project Member #5
So this particular issue is a bit old and I am not sure that it ever got a proper response in any other channel.  So at the moment this works as intended though we may want to change the intent.  

There are 2 options:
1.  failOnError - an option in the Maven plugin
2.  -Awarns     - have checker framework report errors as warnings
At the moment if failOnError is set to false then all errors will be reported as warnings and the build will succeed.  Perhaps the right action here is to set failOnError based on whether or not -Awarns can be found in javacParams?   We could then remove failOnError as a Maven parameter and -Awarns would be the only setting that truly mattered.  

Does anyone have any suggestions or comments?
Feb 26, 2013
Project Member #7
Perhaps I will leave it as is for now.   If there seems to be a number of people confused by this option then we can change it in the future.  
Feb 27, 2013
Project Member #8
(No comment was entered for this change.)
Status: WontFix
Sign in to add a comment

Powered by Google Project Hosting