From: michalkurka Date: Fri, 25 Jan 2019 19:30:06 +0000 (-0800) Subject: Proposed fixes in DefineClassHelper & DefinePackageHelper X-Git-Tag: rel_3_25_0_ga~11^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1b84304638790522bed13bda3d75a3e904682915;p=javassist.git 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. --- 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; } };