]> source.dussan.org Git - javassist.git/commitdiff
Proposed fixes in DefineClassHelper & DefinePackageHelper 243/head
authormichalkurka <michalk@h2o.ai>
Fri, 25 Jan 2019 19:30:06 +0000 (11:30 -0800)
committermichalkurka <michalk@h2o.ai>
Fri, 25 Jan 2019 19:30:06 +0000 (11:30 -0800)
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
src/main/javassist/util/proxy/DefinePackageHelper.java

index 96ade4aa0b64ad6a845204500f8561041ca043f5..106e99326954f23f661a6e3fdc4593b4a63907ba 100644 (file)
@@ -219,9 +219,6 @@ public class DefineClassHelper {
                 if (e instanceof RuntimeException) throw (RuntimeException) e;
                 throw new CannotCompileException(e);
             }
-            finally {
-                SecurityActions.setAccessible(defineClass, false);
-            }
         }
     }
 
index 8a91eb28c8cac3917b66a0ada5fb5d96550a998f..7ddffd9ed2b1e7e0c45b5b30052545606def05a0 100644 (file)
@@ -128,9 +128,6 @@ public class DefinePackageHelper
                 }
                 if (e instanceof RuntimeException) throw (RuntimeException) e;
             }
-            finally {
-                definePackage.setAccessible(false);
-            }
             return null;
         }
     };