Skip to content

Commit

Permalink
Fix issue simple lazy resolution with valid leading characters (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-alvarez-alvarez committed Feb 23, 2024
1 parent a5a938d commit aa5c04a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8408,7 +8408,7 @@ public String getSimpleName() {
return internalName;
}
}
while (simpleNameIndex < internalName.length() && !Character.isLetter(internalName.charAt(simpleNameIndex))) {
while (simpleNameIndex < internalName.length() && !Character.isJavaIdentifierStart(internalName.charAt(simpleNameIndex))) {
simpleNameIndex += 1;
}
return internalName.substring(simpleNameIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ public void testGenericSuperInterfaceNavigatedHierarchyResolutionIsLazy() throws
verifyNoMoreInteractions(classFileLocator);
}

@Test
@Override
public void testSimpleName() throws Exception {
super.testSimpleName();
assertThat(describe($DollarInName.class).getSimpleName(), CoreMatchers.is($DollarInName.class.getSimpleName()));
}

private static class SuperClass {
/* empty */
}
Expand Down Expand Up @@ -265,4 +272,8 @@ T foo(T argument) throws T {
return argument;
}
}

private static class $DollarInName {
/* empty */
}
}

0 comments on commit aa5c04a

Please sign in to comment.