[Checkers] Package @DefaultQualifier annotations

Mahmood Ali mahmood at MIT.EDU
Wed Jun 10 13:47:30 EDT 2009


Greetings,

This should be handled now.  The last compiler check-in should have  
fixed the problem.

Also, please note that the attached files aren't proper.  testPackage/ 
innerPackage/package-info.java should declare testPackage.innerPackage  
package not innerPackage package.  It caused a bit of slowdown  
unfortunately in me figuring out what the problem is.

- Mahmood

On Jun 10, 2009, at 1:21 AM, Michael Ernst wrote:

> Here is the attachment.
>
>                    -Mike
>
>
> ------- start of forwarded message -------
> From: Michael Ernst <mernst at cs.washington.edu>
> To:  <checkers at lists.csail.mit.edu>
> Subject: Package @DefaultQualifier annotations
> Date: Tue, 9 Jun 2009 21:37:59 -0700
>
> Mahmood-
>
> Are @DefaultQualifier annotations respected when they appear on a  
> package?
> They don't seem to be.  Using the attached zip file, when I run these
> commands in the parent directory of testPackage:
>
>
> javac typequals/*.java
> javac -processor checkers.basic.BasicChecker - 
> Aquals 
> =typequals.Prototype,typequals.NonPrototype,typequals.PrototypeOrNot  
> -implicit:class -Xlint:-processing -cp .:$CLASSPATH ./testPackage/ 
> package-info.java ./testPackage/innerPackage/MyFile.java ./ 
> testPackage/innerPackage/package-info.java
>
>
> I get this output:
>
>
> ./testPackage/innerPackage/MyFile.java:9: incompatible types.
>    return f;
>           ^
>  found   : @PrototypeOrNot Float
>  required: @NonPrototype Float
> 1 error
>
>
> I think that the checker should succeed without issuing any errors,  
> because
> the default should be @NonPrototype, but for some reason the default  
> is
> being treated as @PrototypeOrNot.
>
> 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.
>
>
> Request:  In addition to fixing the above problem and adding tests,  
> can you
> please update the @DefaultQualifier Javadoc?  I would like it
> to say  what is the meaning of an annotation on a package (does it  
> apply to
> sub-packages?), and I would like it to say what the default is if no
> @DefaultQualifier annotation is present.
>
>
> When all this is done, I will proceed with the Daikon nullness case  
> study.
>
> Thanks!
>
>                    -Mike
> ------- end of forwarded message -------
>
>
> <testPackage.zip>_______________________________________________
> checkers mailing list
> checkers at lists.csail.mit.edu
> https://lists.csail.mit.edu/mailman/listinfo/checkers




More information about the checkers mailing list