-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Workspaces in Java 11 vs 8 #439
Comments
Thanks for finding this huge bug ! |
Same problem with Java 9 and 10. The problem seems to come from the use of Note that it works fine outside JD+. |
After some digging, I have found that the problem is not related to JAXB. NetBeans module provides its own class loader: // jdk11
private Class<?> getPackageInfo() {
if (packageInfo == null) {
// find package-info.class defined by loader
String cn = packageName() + ".package-info";
Module module = module();
PrivilegedAction<ClassLoader> pa = module::getClassLoader;
ClassLoader loader = AccessController.doPrivileged(pa);
Class<?> c;
if (loader != null) {
c = loader.loadClass(module, cn);
} else {
c = BootLoader.loadClass(module, cn);
}
if (c != null) {
packageInfo = c;
} else {
// store a proxy for the package info that has no annotations
class PackageInfoProxy {}
packageInfo = PackageInfoProxy.class;
}
}
return packageInfo;
}
// jdk8
private Class<?> getPackageInfo() {
if (packageInfo == null) {
try {
packageInfo = Class.forName(pkgName + ".package-info", false, loader);
} catch (ClassNotFoundException ex) {
// store a proxy for the package info that has no annotations
class PackageInfoProxy {}
packageInfo = PackageInfoProxy.class;
}
}
return packageInfo;
} |
It is possible to force load |
Fixed by b8ad2a2 |
Workspaces created with JD+(Java 11) can't be opened with JD+(Java 8) and vice versa.
Error message:
The difference in the xml files seems to be the missing namespace in the Java 11 version. I attached my to test workspaces.
WS_Java8.zip
WS_Java11.zip
The text was updated successfully, but these errors were encountered: