Skip to content

Commit

Permalink
Update InstrumentedType.java to check instrumented classfile is in va…
Browse files Browse the repository at this point in the history
…lid Unicode namespace instead (#1613)
  • Loading branch information
leerjae committed Apr 4, 2024
1 parent 126eafc commit 95b083f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1842,13 +1842,13 @@ private static boolean isValidIdentifier(String[] identifier) {
* @return {@code true} if the given identifier is valid.
*/
private static boolean isValidIdentifier(String identifier) {
if (KEYWORDS.contains(identifier) || identifier.length() == 0 || !Character.isJavaIdentifierStart(identifier.charAt(0))) {
if (KEYWORDS.contains(identifier) || identifier.length() == 0 || !Character.isUnicodeIdentifierStart(identifier.charAt(0))) {
return false;
} else if (identifier.equals(PackageDescription.PACKAGE_CLASS_NAME)) {
return true;
}
for (int index = 1; index < identifier.length(); index++) {
if (!Character.isJavaIdentifierPart(identifier.charAt(index))) {
if (!Character.isUnicodeIdentifierPart(identifier.charAt(index))) {
return false;
}
}
Expand Down

0 comments on commit 95b083f

Please sign in to comment.