[Checkers] Duplicated Errors

Michael Ernst mernst at csail.mit.edu
Wed Nov 5 08:41:28 EST 2008


Mahmood-

Can you give me a list of all the bugs you have reported to Sun, and their
bug numbers or URLs where we can track their progress?  Better yet, you
could put that in either the Checker Framework manual or the JSR 308 README
file.  That will be easier than searching email looking for the
information, and will help me to point out to Sun what they need to fix for
us.

Thanks!

                    -Mike


> From: Mahmood Ali <mahmood at MIT.EDU>
> To: checkers at lists.csail.mit.edu
> Subject: [Checkers] Duplicated Errors
> Date: Fri, 4 Jul 2008 10:43:14 -0400
> 
> Greetings,
> 
> This is in response to the bug report regarding duplicated errors.   
> The details from TODO.txt (for archival purposes) is copied below.
> 
> The bug is not a JSR 308 bug, but rather it's a javac 6 (I didn't  
> check against javac 5).  Here is my transcript for the bug report.
> 
> - Mahmood
> 
> > % javac -versionjavac 1.6.0
> > % javac One.java
> > One.java:1: class Two is public, should be declared in a file named  
> > Two.java
> > public class Two { }
> >        ^
> > 1 error
> > % javac EmptyProcessor.java
> > % javac -processor EmptyProcessor One.java
> > One.java:1: class Two is public, should be declared in a file named  
> > Two.java
> > public class Two { }
> >        ^
> > One.java:1: class Two is public, should be declared in a file named  
> > Two.java
> > public class Two { }
> >        ^
> > 1 error
> > % cat One.java
> > public class Two { }
> > % cat EmptyProcessor.java
> > import javax.annotation.processing.*;
> > import java.util.Set;
> > import javax.lang.model.element.TypeElement;
> > import javax.lang.model.SourceVersion;
> >
> > @SupportedAnnotationTypes("*")
> > @SupportedSourceVersion(SourceVersion.RELEASE_5)
> > public class EmptyProcessor extends AbstractProcessor {
> >     @Override
> >     public boolean process(Set<? extends TypeElement> annotations,
> > 			   RoundEnvironment roundEnv) {
> >         return true;
> >     }
> > }
> > %
> 
> --------------------------------- Bug Report  
> ----------------------------------
> 
> > Problem with duplicate errors being output.
> >
> > Consider a file WrongFileName.java with the following contents:
> >
> > public class TheClassNameDoesntMatchTheFileName { }
> >
> > javac warns that the class name doesn't match the file name.
> > When run with a type processor, the identical error gets output twice.
> > See transcript below.
> >
> > % javac WrongFileName.java
> > WrongFileName.java:1: class TheClassNameDoesntMatchTheFileName is  
> > public, should be declared in a file named  
> > TheClassNameDoesntMatchTheFileName.java
> > public class TheClassNameDoesntMatchTheFileName { }
> >        ^
> > 1 error
> > % javac -typeprocessor checkers.interning.InterningChecker    
> > WrongFileName.java
> > WrongFileName.java:1: class TheClassNameDoesntMatchTheFileName is  
> > public, should be declared in a file named  
> > TheClassNameDoesntMatchTheFileName.java
> > public class TheClassNameDoesntMatchTheFileName { }
> >        ^
> > WrongFileName.java:1: class TheClassNameDoesntMatchTheFileName is  
> > public, should be declared in a file named  
> > TheClassNameDoesntMatchTheFileName.java
> > public class TheClassNameDoesntMatchTheFileName { }
> >        ^
> > 1 error
> 
> 
> _______________________________________________
> checkers mailing list
> checkers at lists.csail.mit.edu
> https://lists.csail.mit.edu/mailman/listinfo/checkers



More information about the checkers mailing list