From dc75b05429b8a1abd0e929c287df338afa8e03be Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 14 Jan 2020 22:28:26 +0000 Subject: [PATCH] Switch back to the native Pack200 implementation for the moment This isn't ideal as it's deprecated. However, while Apache Harmony's unpack200 implementation seems fine, its pack200 implementation doesn't work with the client and produces invalid output. I've fixed some of the easy to fix bugs, but tracking down any remaining bugs will be difficult - it'll involve tracing through the native unpack200 code. When Pack200 is removed from the JDK, hopefully someone will take up the mantle of maintaining it outside of the JDK. If that doesn't happen, we'll have to consider writing our own Pack200 implementation, extracting OpenJDK's implementation out of the tree or fixing the bugs in Apache Harmony. --- asm/pom.xml | 4 ---- asm/src/main/java/dev/openrs2/asm/classpath/Library.kt | 2 +- pom.xml | 5 ----- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/asm/pom.xml b/asm/pom.xml index c112d004..53c59ee2 100644 --- a/asm/pom.xml +++ b/asm/pom.xml @@ -23,10 +23,6 @@ openrs2-common ${project.version} - - dev.openrs2 - pack200 - org.ow2.asm asm diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt b/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt index 88429dba..f73846b2 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt @@ -5,7 +5,6 @@ import dev.openrs2.asm.hasCode import dev.openrs2.asm.remap.ClassForNameRemapper import dev.openrs2.common.io.DeterministicJarOutputStream import dev.openrs2.common.io.SkipOutputStream -import org.apache.harmony.pack200.Pack200 import org.objectweb.asm.ClassReader import org.objectweb.asm.ClassWriter import org.objectweb.asm.commons.ClassRemapper @@ -23,6 +22,7 @@ import java.util.jar.JarEntry import java.util.jar.JarInputStream import java.util.jar.JarOutputStream import java.util.jar.Manifest +import java.util.jar.Pack200 import java.util.zip.GZIPInputStream import java.util.zip.GZIPOutputStream diff --git a/pom.xml b/pom.xml index e450b812..013a329d 100644 --- a/pom.xml +++ b/pom.xml @@ -84,11 +84,6 @@ openrs2-natives-all 2.0.0 - - dev.openrs2 - pack200 - 1.0.2 - io.netty netty-buffer