[Checkers] Interned checker throws ClassCastException
Mahmood Ali
mahmood at MIT.EDU
Sat Mar 1 14:59:41 EST 2008
On Mar 1, 2008, at 2:43 PM, Matt Papi wrote:
> Actually, I just realized that sometimes an array access may not
> have a
> symbol. For instance, in the expression:
>
> (foo == bar ?
> new int[@Interned] { 1, 2, 3 } : new int[@Interned] { 4, 5, 6 })
> [0]
>
Very true, arrays like any other expression tree may not always have
an element.
> What's the context in which you're calling symbol() on an array
> access?
> Maybe there's a better way to get the information you need from the
> element?
I am calling InternalUtils on variables in assignments to see if they
are assignable fields or not. A variable in an assignment should
always have an element.
> Shouldn't it be the case that there are never illegal assignments made
> in anonymous constructors? I just skimmed JLS 15.9.5.1, and it seems
> like if the arguments to the "new" expression check out, the super()
> call in the anonymous constructor will as well.
I think that occured within SRManagerTest.java in FreePastry. I will
investigate this again to see what the actual problem was. I think it
was that simply that the implicit constructor was using full canonical
names for the constructor which would cause the other problem I saw. I
came across SRManagerTest before the other problems.
> P.S. This mailing list is great. I wish we'd set this up a while
> ago! :)
Agreed. Better communication is usually good =).
- Mahmood
More information about the checkers
mailing list