[Checkers] Package @DefaultQualifier annotations

Mahmood Ali mahmood at MIT.EDU
Wed Jun 10 12:26:43 EDT 2009

Greetings Mike,

Finally I was able to track down this bug.  It's indeed a compiler  
bug, where the package annotations if read from source are ignored by  
the time of type processor.  I'm creating a jtreg test for it now and  
it should be checked in really soon.

> Additionally, if the
>  testPackage/innerPackage/package-info.java
> file is removed, I think type-checking should still succeed, because I
> would assume that the default for testPackage applies to all  
> subpackages as
> well.

This is very reasonable and desirable.  However, it goes against the  
convention of Sun.  Unfortunately, java treats subpackages as  
independent packages.  The main example that comes to mind is  
'protected' and package scopes, e.g. subpackage classes cannot access  
the package protected classes.

We can change that for us, as I believe that it is the most intuitive  


More information about the checkers mailing list