[Checkers] Interned test cases
Michael Ernst
mernst at csail.mit.edu
Wed Mar 19 04:19:25 EDT 2008
Mahmood-
> 1. Method overriding check takes the type annotated type argument into
> account. So now the checkers would emit an error for the following code:
> class MyList extends ArrayList<@Interned String> {
> public Iterator<String> iterator() { return null; }
> }
> iterator() return value should be Iterator<@Interned String> rather
> than Iterator<String>
Thanks for this fix.
Did you write a test case as well? I searched for the above one, but it
didn't appear in the interned test suite. I didn't want to search through
all the tests looking for it, so I added the test case from your progress
report. (Maybe you added some other, different test case that tests the
same thing?) Please do add tests for things that you fix. This is
valuable for regression testing, but it's also valuable when evaluating our
tools against other people's tools (rather than trying to run complicated
code and understand the differences).
As Matt said, we should all run the tests before checking in changes.
Incidentally, earlier this morning I added a new failing test case to the
Interned checker. It's generics-related, but is also related to the topic
of method overriding that we discussed a couple weeks ago. Maybe you (or
someone else, but please coordinate) could have a look at it when you get a
chance.
Thanks a lot!
-Mike
More information about the checkers
mailing list