[JSR308] Checkers Framework Instability
Mahmood Ali
mahmood at MIT.EDU
Fri Dec 19 12:12:06 EST 2008
Greetings Chester,
I apologize for not following the thread more closely. I will go over
the emails soon.
> In general, the Checker framework seems not very stable for me, or
> simply my incorrect-use of the Checker's code.
> There are several NullPointer Exceptions.
My initial guess is that the environment isn't initialized properly.
I would recommend that you run the processor with assertions enabled.
Does PanguProcessor or ResourceBundleProcessor extend SourceChecker?
In the stacktrace you provided, it seems that you implemented your own
processor. You should be careful about that.
As we discussed earlier, typical annotation processors do not get all
the necessary type information from the compiler, especially type
information regarding local variables. SourceChecker.process()
(SourceChecker.attribute() to be exact) performs some magic calls to
the compiler to get the type information by starting an "attribution"
phase.
If you're processor doesn't invoke the attribution phase, many methods
in AnnotatedTypeFactory (and the rest of the framework) would fail.
If you want to rely on type information (instead of what I sampled
earlier), I highly recommend using SourceChecker.
Regards,
Mahmood
More information about the JSR308
mailing list