Skip to content

Commit 95b083f

Browse files
authored
Update InstrumentedType.java to check instrumented classfile is in valid Unicode namespace instead (#1613)
1 parent 126eafc commit 95b083f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,13 +1842,13 @@ private static boolean isValidIdentifier(String[] identifier) {
18421842
* @return {@code true} if the given identifier is valid.
18431843
*/
18441844
private static boolean isValidIdentifier(String identifier) {
1845-
if (KEYWORDS.contains(identifier) || identifier.length() == 0 || !Character.isJavaIdentifierStart(identifier.charAt(0))) {
1845+
if (KEYWORDS.contains(identifier) || identifier.length() == 0 || !Character.isUnicodeIdentifierStart(identifier.charAt(0))) {
18461846
return false;
18471847
} else if (identifier.equals(PackageDescription.PACKAGE_CLASS_NAME)) {
18481848
return true;
18491849
}
18501850
for (int index = 1; index < identifier.length(); index++) {
1851-
if (!Character.isJavaIdentifierPart(identifier.charAt(index))) {
1851+
if (!Character.isUnicodeIdentifierPart(identifier.charAt(index))) {
18521852
return false;
18531853
}
18541854
}

0 commit comments

Comments
 (0)