...
 
Commits (2)
  • Markus Koschany's avatar
    Import Debian changes 10.0-1 · d27d84d6
    Markus Koschany authored
    netbeans (10.0-1) unstable; urgency=medium
    
      * New upstream version 10.0.
         - Fixes CVE-2016-5537. (Closes: #852029)
         - Fix Netbeans is not starting. (Closes: #894715)
         - Fix broken symlinks. (Closes: #857955)
      * Declare compliance with Debian Policy 4.3.0.
      * Use canonical VCS URI.
      * Remove w3c-sgm-lib and libpostgresql-jdbc-java dependencies.
      * Drop libmysql-java dependency. (Closes: #913362)
    d27d84d6
  • Markus Koschany's avatar
    Add Unsafe.patch · 293cac81
    Markus Koschany authored
    293cac81
From: Markus Koschany <apo@debian.org>
Date: Wed, 16 Jan 2019 15:27:51 +0100
Subject: NoJavacHelper
Java 11 work around.
---
.../org/netbeans/modules/java/source/NoJavacHelper.java | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java b/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java
index d60f6a8..a6ccdd1 100644
--- a/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java
+++ b/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java
@@ -58,19 +58,7 @@ public class NoJavacHelper {
@Override
public void run() {
if (!hasWorkingJavac()) {
- ClassWriter w = new ClassWriter(0);
- w.visit(Opcodes.V1_8, Opcodes.ACC_ABSTRACT | Opcodes.ACC_PUBLIC, "com/sun/tools/javac/code/Scope$WriteableScope", null, "com/sun/tools/javac/code/Scope", null);
- byte[] classData = w.toByteArray();
- try {
- Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
- theUnsafe.setAccessible(true);
- Unsafe unsafe = (Unsafe) theUnsafe.get(null);
- Class scopeClass = Class.forName("com.sun.tools.javac.code.Scope");
- unsafe.defineClass("com.sun.tools.javac.code.Scope$WriteableScope", classData, 0, classData.length, scopeClass.getClassLoader(), scopeClass.getProtectionDomain());
- } catch (Throwable t) {
- //ignore...
- Logger.getLogger(NoJavacHelper.class.getName()).log(Level.FINE, null, t);
- }
+ throw new UnsupportedOperationException("ClassDefinitionUtils.defineClass() relies on com.sun.misc.Unsafe.defineClass() which was removed in Java 11");
}
}
From: Markus Koschany <apo@debian.org>
Date: Sat, 26 Jan 2019 16:56:30 +0100
Subject: Unsafe
Fix FTBFS with Java 11.
---
.../src/org/netbeans/modules/java/source/NoJavacHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java b/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java
index d60f6a8..ab7234b 100644
--- a/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java
+++ b/java/java.source.base/src/org/netbeans/modules/java/source/NoJavacHelper.java
@@ -21,10 +21,10 @@ package org.netbeans.modules.java.source;
import java.lang.reflect.Field;
import java.util.logging.Level;
import java.util.logging.Logger;
+import jdk.internal.misc.Unsafe;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.openide.modules.OnStart;
-import sun.misc.Unsafe;
/**
*
......@@ -22,7 +22,6 @@ netbeans-extexecution.patch
netbeans-libs.jaxb.patch
javaewah-version.patch
xml.wsdl.model.patch
NoJavacHelper.patch
netbeans-CommandLineParser.patch
osgi-update.patch
netbeans-empty-binaries-list.patch
......@@ -35,3 +34,4 @@ netbeans-slf4j.dummy.patch
disable-Git-support.patch
disable-nativeexecution-module.patch
o.apache.commons.io.patch
Unsafe.patch