Skip to content

Commit

Permalink
Remove non-anonymous inner class matching
Browse files Browse the repository at this point in the history
Signed-off-by: Mobolaji Adefope <mbadefop@edu.uwaterloo.ca>
  • Loading branch information
moboa committed May 1, 2019
1 parent 80f49fd commit bc60ff8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ public boolean isAssignableTo(DescribedPredicate<? super JavaClass> predicate) {
* otherwise false
*/
private boolean isAnonymousInnerClassOf(Class<?> clazz) {
return getName().startsWith(clazz.getName() + '$');
return isInnerClass() && enclosingClass.get().isEquivalentTo(clazz) && isAnonymous();
}

private boolean anyMatches(List<JavaClass> possibleTargets, DescribedPredicate<? super JavaClass> predicate) {
Expand Down

0 comments on commit bc60ff8

Please sign in to comment.