[Checkers] Spaces in commented JSR 308 annotations

Michael Ernst mernst at csail.mit.edu
Sat Jun 7 08:42:48 EDT 2008


Thanks for trying our pluggable type-checkers.  I'm sorry you had trouble,
and we want to figure out how to solve your problem.  (Do let us know if
you have any other problems that hinder your use of the tools.)

As I understand it, you had a problem regarding spaces in annotation

Eclipse's built-in indentation command (invoked via "Source > Correct
Indentation") inserts space in comments, including those that represent JSR
308 annotations; for instance, it converts
  List</*@NonNull*/ String> myStrings;
  List</* @NonNull */ String> myStrings;

Then, the JSR 308 compiler doesn't recognize the annotation comment any
more, because by default the compiler only recognizes annotation comments
with no spaces.

1. Is the above description correct?

2. Is there a way to configure the "Correct Indentation" action so that it
does not insert the extra spaces?  (I'm interested in this even if you are
not willing to customize your Eclipse in that manner.)

3. You would like an option to the JSR 308 compiler that will cause it to
recognize annotation comments even when they contain spaces.  Do you have
other requests regarding the compiler?



More information about the checkers mailing list