Skip to content
Commits on Source (3)
gmbal-pfl (4.0.1-b003-2) unstable; urgency=medium
* Fixed the build failure with Java 11 (Closes: #909257)
* Standards-Version updated to 4.2.1
-- Emmanuel Bourg <ebourg@apache.org> Fri, 30 Nov 2018 09:02:33 +0100
gmbal-pfl (4.0.1-b003-1) unstable; urgency=medium
* Initial release (Closes: #904326)
......
......@@ -11,7 +11,7 @@ Build-Depends:
libmaven-bundle-plugin-java,
libmaven-source-plugin-java,
maven-debian-helper (>= 2.1)
Standards-Version: 4.1.5
Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/java-team/gmbal-pfl.git
Vcs-Browser: https://salsa.debian.org/java-team/gmbal-pfl
Homepage: https://javaee.github.io/gmbal-pfl/
......
Description: Fixes the compatibility with Java 11
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/pfl-basic/src/main/java/org/glassfish/pfl/basic/reflection/BridgeBase.java
+++ b/pfl-basic/src/main/java/org/glassfish/pfl/basic/reflection/BridgeBase.java
@@ -264,7 +264,12 @@
* @param protectionDomain the domain in which the class should be defined
*/
public final Class<?> defineClass(String className, byte[] classBytes, ClassLoader classLoader, ProtectionDomain protectionDomain) {
- return unsafe.defineClass(className, classBytes, 0, classBytes.length, classLoader, null);
+ try {
+ Method defineClass = unsafe.getClass().getMethod("defineClass", new Class[]{String.class, byte[].class, int.class, int.class, ClassLoader.class, ProtectionDomain.class});
+ return (Class) defineClass.invoke(unsafe, className, classBytes, 0, classBytes.length, classLoader, null);
+ } catch (Exception e) {
+ throw new RuntimeException(e.getMessage(), e);
+ }
}
/**
01-jar-packaging.patch
02-java11-compatibility.patch