Hello community,

here is the log from the commit of package icedtea-web for openSUSE:Factory 
checked in at 2015-11-12 19:40:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/icedtea-web (Old)
 and      /work/SRC/openSUSE:Factory/.icedtea-web.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "icedtea-web"

Changes:
--------
--- /work/SRC/openSUSE:Factory/icedtea-web/icedtea-web.changes  2015-09-17 
09:20:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.icedtea-web.new/icedtea-web.changes     
2015-11-12 19:40:43.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Nov  3 14:24:52 UTC 2015 - fst...@suse.com
+
+- Added patch:
+  * icedtea-web-1.6.1-doInit.patch
+    - Adapt to the removal of support for serialized applets from
+      jdk9's java.desktop
+
+-------------------------------------------------------------------
java-1_7_0-openjdk-plugin.changes: same change
java-1_8_0-openjdk-plugin.changes: same change

New:
----
  icedtea-web-1.6.1-doInit.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ java-1_7_0-openjdk-plugin.spec ++++++
--- /var/tmp/diff_new_pack.9Dxvr4/_old  2015-11-12 19:40:44.000000000 +0100
+++ /var/tmp/diff_new_pack.9Dxvr4/_new  2015-11-12 19:40:44.000000000 +0100
@@ -33,6 +33,7 @@
 Group:          Development/Languages/Java
 Url:            http://icedtea.classpath.org
 Source0:        
http://icedtea.classpath.org/download/source/icedtea-web-%{version}.tar.gz
+Patch0:         icedtea-web-1.6.1-doInit.patch
 Patch1000:      icedtea-web-suse-desktop-files.patch
 BuildRequires:  %{java_name}-devel >= %{javaver}
 # IcedTeaPlugin build requirements.
@@ -81,6 +82,7 @@
 
 %prep
 %setup -q -n icedtea-web-%{version}
+%patch0 -p1
 %patch1000 -p1
 
 %build

java-1_8_0-openjdk-plugin.spec: same change
++++++ icedtea-web-1.6.1-doInit.patch ++++++
--- icedtea-web-1.6.1/netx/net/sourceforge/jnlp/NetxPanel.java  2015-09-11 
15:02:04.270280337 +0200
+++ icedtea-web-1.6.1/netx/net/sourceforge/jnlp/NetxPanel.java  2015-10-27 
09:08:17.251613720 +0100
@@ -204,7 +204,7 @@
     }
 
     public void init(PluginBridge bridge) throws LaunchException {
-        doInit = true;
+        setDoInitIfExists(true);
         dispatchAppletEvent(APPLET_LOADING, null);
         status = APPLET_LOAD;
 
--- icedtea-web-1.6.1/netx/sun/applet/AppletViewerPanelAccess.java      Tue Oct 
27 14:13:23 2015 +0100
+++ icedtea-web-1.6.1/netx/sun/applet/AppletViewerPanelAccess.java      Tue Nov 
03 14:06:31 2015 +0100
@@ -41,6 +41,7 @@
 import java.util.Hashtable;
 import java.util.Map;
 import net.sourceforge.jnlp.NetxPanel;
+import net.sourceforge.jnlp.util.logging.OutputController;
 
 public abstract class AppletViewerPanelAccess extends AppletViewerPanel {
 
@@ -132,4 +133,36 @@
 
     abstract protected void ourRunLoader();
 
+    /**
+     * jdk9 removed doInit.
+     * http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/2b680924a73f This is way 
how
+     * to set it in older jdks and still compile on jdk9+
+     *
+     * @param a value to set to doInit if it exists
+     */
+    protected void setDoInitIfExists(boolean a) {
+        //doInit = a;
+        try {
+            Class c = this.getClass();
+            Field fs = null;
+            while (c != null) {
+                if (AppletPanel.class.equals(c)) {
+                    fs = c.getDeclaredField("doInit");
+                    break;
+                }
+                //known location is 
NetxPanel->AppeltViwerPannelAccess->AppletViwerPanel->AppletPanel
+                c = c.getSuperclass();
+            }
+            if (fs == null) {
+                throw new NoSuchFieldException("AppletPanel not found.");
+            }
+            fs.setAccessible(true);
+            fs.set(this, a);
+        } catch (IllegalAccessException | IllegalArgumentException | 
NoSuchFieldException | SecurityException ex) {
+            OutputController.getLogger().log("Can't get/set doInit. Runing on 
JDK9 or higher?");
+            OutputController.getLogger().log(ex);
+        }
+
+    }
+
 }

Reply via email to