Project: AspectJ
Bug 73895 unnecessary cast causing problems
Reported: 2004-09-14 13:08:41 | Status: resolved fixed

class: org.aspectj.weaver.ResolvedTypeX$Name method: isCoerceableFrom(..) I am having trouble with the line: ResolvedMember[] b = ((Name)other).getDeclaredMethods(); //??? is this cast always safe As the comment suggests this cast is NOT always safe. In my case the cast is not safe because I have some additional implementations for ResolvedTypeX (some optimizations). Solution: just remove the cast since the method "getDeclaredMethods" is already defined abstract in the type of "other" (ResolvedTypeX). So the cast seems to be obsolete anyway.

Files changed in fix:
weaver/src/org/aspectj/weaver/ResolvedTypeX.java