From 1b84304638790522bed13bda3d75a3e904682915 Mon Sep 17 00:00:00 2001 From: michalkurka Date: Fri, 25 Jan 2019 11:30:06 -0800 Subject: [PATCH] Proposed fixes in DefineClassHelper & DefinePackageHelper Don't try to clean-up after making a protected-final method accessible. No synchronization with concurrent access can cause errors. --- src/main/javassist/util/proxy/DefineClassHelper.java | 3 --- src/main/javassist/util/proxy/DefinePackageHelper.java | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/main/javassist/util/proxy/DefineClassHelper.java b/src/main/javassist/util/proxy/DefineClassHelper.java index 96ade4aa..106e9932 100644 --- a/src/main/javassist/util/proxy/DefineClassHelper.java +++ b/src/main/javassist/util/proxy/DefineClassHelper.java @@ -219,9 +219,6 @@ public class DefineClassHelper { if (e instanceof RuntimeException) throw (RuntimeException) e; throw new CannotCompileException(e); } - finally { - SecurityActions.setAccessible(defineClass, false); - } } } diff --git a/src/main/javassist/util/proxy/DefinePackageHelper.java b/src/main/javassist/util/proxy/DefinePackageHelper.java index 8a91eb28..7ddffd9e 100644 --- a/src/main/javassist/util/proxy/DefinePackageHelper.java +++ b/src/main/javassist/util/proxy/DefinePackageHelper.java @@ -128,9 +128,6 @@ public class DefinePackageHelper } if (e instanceof RuntimeException) throw (RuntimeException) e; } - finally { - definePackage.setAccessible(false); - } return null; } }; -- 2.39.5