8009389: Unpack200 native library should be removed from profiles
authorksrini
Tue, 30 Apr 2013 13:12:54 -0700
changeset 17202 5e820bcaed07
parent 17201 a25f69a6e69f
child 17203 be1cff0d6750
8009389: Unpack200 native library should be removed from profiles Reviewed-by: alanb, bobv, jrose
jdk/makefiles/profile-includes.txt
jdk/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java
--- a/jdk/makefiles/profile-includes.txt	Tue Apr 30 12:32:49 2013 -0700
+++ b/jdk/makefiles/profile-includes.txt	Tue Apr 30 13:12:54 2013 -0700
@@ -36,7 +36,6 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX) \
-    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX) \
@@ -172,6 +171,7 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX) \
+    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) \
     alt-rt.jar \
     charsets.jar \
     cmm/CIEXYZ.pf \
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Tue Apr 30 12:32:49 2013 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Tue Apr 30 13:12:54 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,7 +132,12 @@
                 in0.close();
                 Utils.markJarFile(out);
             } else {
-                (new NativeUnpack(this)).run(in0, out);
+                try {
+                    (new NativeUnpack(this)).run(in0, out);
+                } catch (UnsatisfiedLinkError ule) {
+                    // failover to java implementation
+                    (new DoUnpack()).run(in0, out);
+                }
                 in0.close();
                 Utils.markJarFile(out);
             }