[Checkers] Package @DefaultQualifier annotations
Michael Ernst
mernst at cs.washington.edu
Wed Jun 10 01:21:13 EDT 2009
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 -------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testPackage.zip
Type: application/zip
Size: 4645 bytes
Desc: not available
Url : https://lists.csail.mit.edu/mailman/private/checkers/attachments/20090609/0888f93a/attachment.zip
More information about the checkers
mailing list