From 95b083f42e5ebfd2bb69ee4904fbb90e083489f3 Mon Sep 17 00:00:00 2001 From: leerjae <165955967+leerjae@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:51:13 -0700 Subject: [PATCH] Update InstrumentedType.java to check instrumented classfile is in valid Unicode namespace instead (#1613) --- .../java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java index 22b400395a7..1df77cc700f 100644 --- a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java +++ b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java @@ -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; } }