Open GoogleCodeExporter opened 9 years ago
You are correct, this is harmless (but the test case still indicates a bug).
The warning message is related to the constant value analysis (which is invoked
by reflection resolution).
It says that the Checker Framework tried to determine, at compile time, the
run-time value of an expression; it was unable to do so, so it proceeded
normally.
I see a few issues here that could be improved:
* the method.evaluation.exception error message should default to off rather than on, since it is primarily of interest to people who are trying to understand the behavior of the constant value analysis.
* if the message is issued, it should be issued only once rather than multiple times (I saw it 4 times in the test case).
* str is not a constant expression, so I'm not sure why str.substring(0, index) is being evaluated by the constant value analysis at all.
The command line
$CHECKERFRAMEWORK/bin/javac -g -processor org.checkerframework.checker.nullness.NullnessChecker TestResolveReflection.java -AresolveReflection
reproduces the error, when used with the attached file.
Original comment by michael.ernst@gmail.com
on 19 Apr 2015 at 8:12
Attachments:
Original issue reported on code.google.com by
trask.st...@gmail.com
on 19 Apr 2015 at 7:22