This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new 38d63225ea Simplify 38d63225ea is described below commit 38d63225ea275b6690e6bc642987ac4a457b2e63 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Feb 21 17:34:00 2025 +0000 Simplify --- java/org/apache/tomcat/util/compat/Jre12Compat.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/compat/Jre12Compat.java b/java/org/apache/tomcat/util/compat/Jre12Compat.java index ea27f455f4..e89499c291 100644 --- a/java/org/apache/tomcat/util/compat/Jre12Compat.java +++ b/java/org/apache/tomcat/util/compat/Jre12Compat.java @@ -131,9 +131,8 @@ public class Jre12Compat extends JreCompat { * the attempt to set the 'useCanonCaches' field to fail. Users that really want to use Java 18 to 20 * will have to ensure that they do not explicitly enable the canonical file name cache. */ - VarHandle modifiers; Lookup lookup = MethodHandles.privateLookupIn(Field.class, MethodHandles.lookup()); - modifiers = lookup.findVarHandle(Field.class, "modifiers", int.class); + VarHandle modifiers = lookup.findVarHandle(Field.class, "modifiers", int.class); modifiers.set(f, f.getModifiers() & ~Modifier.FINAL); } catch (InaccessibleObjectException | ReflectiveOperationException | IllegalArgumentException e) { // Make sure field is not set. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org