Skip to content
Commits on Source (3)
procyon (0.5.32-5) unstable; urgency=medium
* Team upload.
* Fixed the build failure with Java 11 (Closes: #909259)
* Standards-Version updated to 4.3.0
-- Emmanuel Bourg <ebourg@apache.org> Mon, 25 Feb 2019 11:35:03 +0100
procyon (0.5.32-4) unstable; urgency=medium
* Team upload.
......
......@@ -10,7 +10,7 @@ Build-Depends:
javahelper,
libjcommander-java (>= 1.71-1~),
maven-repo-helper
Standards-Version: 4.1.4
Standards-Version: 4.3.0
Vcs-Git: https://salsa.debian.org/java-team/procyon.git
Vcs-Browser: https://salsa.debian.org/java-team/procyon
Homepage: https://bitbucket.org/mstrobel/procyon
......
Description: Fixes the compatibility with Java 11
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://bitbucket.org/mstrobel/procyon/issues/331
--- a/Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
+++ b/Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
@@ -1231,12 +1231,15 @@
_hasBeenCreated = true;
- _generatedClass = (Class<T>) getUnsafeInstance().defineClass(
+ ClassLoader classloader = ClassLoader.getSystemClassLoader();
+ java.lang.reflect.Method defineClass = classloader.getClass().getDeclaredMethod("defineClass", String.class, byte[].class, int.class, int.class, ProtectionDomain.class);
+ defineClass.setAccessible(true);
+
+ _generatedClass = (Class<T>) defineClass.invoke(classloader,
fullName,
classBytes,
0,
classBytes.length,
- ClassLoader.getSystemClassLoader(),
_protectionDomain
);
......@@ -2,3 +2,4 @@
02-cli-program-name.patch
03-java9-compatibility.patch
04-jcommander-compatibility.patch
05-java11-compatibility.patch