/hg/icedtea-web: Adapted to change in package of HexDumpEncoder ...
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Thu Jan 14 15:29:04 UTC 2016
changeset 968f54348b70 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=968f54348b70
author: Jiri Vanek <jvanek at redhat.com>
date: Thu Jan 14 16:28:48 2016 +0100
Adapted to change in package of HexDumpEncoder (1.8 sun.misc.HexDumpEncoder, 1.9 sun.security.util.HexDumpEncoder)
* acinclude.m4: added new macro IT_CHECK_FOR_HEXDUMPENCODER, which tries both locations of HexDumpEncoder
* configure.ac: now uses IT_CHECK_FOR_HEXDUMPENCODER instead of IT_CHECK_FOR_CLASS(SUN_MISC_HEXDUMPENCODER, [sun.misc.HexDumpEncoder])
* netx/net/sourceforge/jnlp/security/dialogs/CertsInfoPane.java: added imports to both import sun.misc.*; and import sun.security.util.*;
diffstat:
ChangeLog | 12 ++
acinclude.m4 | 49 +++++++++++
configure.ac | 4 +-
netx/net/sourceforge/jnlp/security/dialogs/CertsInfoPane.java | 9 +-
4 files changed, 71 insertions(+), 3 deletions(-)
diffs (119 lines):
diff -r 39239a9c6224 -r 968f54348b70 ChangeLog
--- a/ChangeLog Thu Jan 14 12:22:37 2016 +0100
+++ b/ChangeLog Thu Jan 14 16:28:48 2016 +0100
@@ -1,3 +1,15 @@
+2016-01-14 Jiri Vanek <jvanek at redhat.com>
+ Fridrich Strba <fridrich.strba at suse.com>
+
+ Adapted to change in package of HexDumpEncoder (1.8 sun.misc.HexDumpEncoder,
+ 1.9 sun.security.util.HexDumpEncoder)
+ * acinclude.m4: added new macro IT_CHECK_FOR_HEXDUMPENCODER, which tries both
+ locations of HexDumpEncoder
+ * configure.ac: now uses IT_CHECK_FOR_HEXDUMPENCODER instead of
+ IT_CHECK_FOR_CLASS(SUN_MISC_HEXDUMPENCODER, [sun.misc.HexDumpEncoder])
+ * netx/net/sourceforge/jnlp/security/dialogs/CertsInfoPane.java: added imports
+ to both import sun.misc.*; and import sun.security.util.*;
+
2016-01-14 Jiri Vanek <jvanek at redhat.com>
Added GenericName to desktop files
diff -r 39239a9c6224 -r 968f54348b70 acinclude.m4
--- a/acinclude.m4 Thu Jan 14 12:22:37 2016 +0100
+++ b/acinclude.m4 Thu Jan 14 16:28:48 2016 +0100
@@ -500,6 +500,55 @@
AC_PROVIDE([$0])dnl
])
+dnl Macro to check for a Java class HexDumpEncoder
+AC_DEFUN([IT_CHECK_FOR_HEXDUMPENCODER],[
+AC_REQUIRE([IT_FIND_JAVAC])
+AC_REQUIRE([IT_FIND_JAVA])
+AC_CACHE_CHECK([if HexDumpEncoder is available], it_cv_HEXDUMPENCODER, [
+CLASS=sun/applet/Test.java
+BYTECODE=$(echo $CLASS|sed 's#\.java##')
+mkdir -p tmp.$$/$(dirname $CLASS)
+cd tmp.$$
+cat << \EOF > $CLASS
+[/* [#]line __oline__ "configure" */
+package sun.applet;
+
+import sun.misc.*;
+import sun.security.util.*;
+
+public class Test
+{
+ public static void main(String[] args)
+ throws Exception
+ {
+ try {
+ System.out.println(Class.forName("sun.misc.HexDumpEncoder"));
+ } catch (ClassNotFoundException e) {
+ System.out.println(Class.forName("sun.security.util.HexDumpEncoder"));
+ }
+ }
+}
+]
+EOF
+if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then
+ if $JAVA -classpath . $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then
+ it_cv_HEXDUMPENCODER=yes;
+ else
+ it_cv_HEXDUMPENCODER=no;
+ fi
+else
+ it_cv_HEXDUMPENCODER=no;
+fi
+])
+rm -f $CLASS *.class
+cd ..
+# should be rmdir but has to be rm -rf due to sun.applet usage
+rm -rf tmp.$$
+if test x"${it_cv_HEXDUMPENCODER}" = "xno"; then
+ AC_MSG_ERROR([HexDumpEncoder not found.])
+fi
+])
+
AC_DEFUN_ONCE([IT_CHECK_FOR_MERCURIAL],
[
AC_PATH_TOOL([HG],[hg])
diff -r 39239a9c6224 -r 968f54348b70 configure.ac
--- a/configure.ac Thu Jan 14 12:22:37 2016 +0100
+++ b/configure.ac Thu Jan 14 16:28:48 2016 +0100
@@ -68,7 +68,7 @@
dnl PR46074 (gcc) - Missing java.net cookie code required by IcedTea plugin
dnl IT563 - NetX uses sun.security code
-dnl IT605 - NetX depends on sun.misc.HexDumpEncoder
+dnl IT605 - NetX depends on sun.misc HexDumpEncoder or sun.security.util.HexDumpEncoder
dnl IT570 - NetX depends on sun.applet.AppletViewPanel
dnl IT571 - NetX depends on com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager.java
dnl IT573 - Plugin depends on sun.awt,X11.XEmbeddedFrame.java
@@ -83,7 +83,7 @@
IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_SECURITYCONSTANTS, [sun.security.util.SecurityConstants])
IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker])
IT_CHECK_FOR_CLASS(SUN_SECURITY_X509_X500NAME, [sun.security.x509.X500Name])
-IT_CHECK_FOR_CLASS(SUN_MISC_HEXDUMPENCODER, [sun.misc.HexDumpEncoder])
+IT_CHECK_FOR_HEXDUMPENCODER
IT_CHECK_FOR_CLASS(SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION, [sun.security.validator.ValidatorException])
IT_CHECK_FOR_CLASS(COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER,
[com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager])
diff -r 39239a9c6224 -r 968f54348b70 netx/net/sourceforge/jnlp/security/dialogs/CertsInfoPane.java
--- a/netx/net/sourceforge/jnlp/security/dialogs/CertsInfoPane.java Thu Jan 14 12:22:37 2016 +0100
+++ b/netx/net/sourceforge/jnlp/security/dialogs/CertsInfoPane.java Thu Jan 14 16:28:48 2016 +0100
@@ -43,8 +43,15 @@
import java.security.cert.CertPath;
import java.security.cert.X509Certificate;
import java.security.MessageDigest;
+/**
+ * Do not remove this two unused imports, nor expands its "*" call.
+ * It is workaround to allow itw to run on jdk8 and older and also on jdk9 and newer
+ */
-import sun.misc.HexDumpEncoder;
+// jdk8 is using sun.misc.HexDumpEncoder,
+import sun.misc.*;
+// jdk9 is using sun.security.util.HexDumpEncoder
+import sun.security.util.*;
import sun.security.x509.*;
import javax.swing.*;
import javax.swing.event.*;
More information about the distro-pkg-dev
mailing list