/hg/icedtea-web: 2 new changesets

ddadacha at icedtea.classpath.org ddadacha at icedtea.classpath.org
Mon Feb 13 08:47:21 PST 2012


changeset eb09075636e5 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=eb09075636e5
author: Danesh Dadachanji <ddadacha at redhat.com>
date: Mon Feb 13 11:30:23 2012 -0500

	Fix regression in broken AppletTest.


changeset 89eb20442421 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=89eb20442421
author: Danesh Dadachanji <ddadacha at redhat.com>
date: Mon Feb 13 11:35:49 2012 -0500

	Path to NEW_LINE_IFS is incorrect.


diffstat:

 ChangeLog                                                |  14 ++++++++++++++
 Makefile.am                                              |  10 +++++-----
 netx/net/sourceforge/jnlp/Launcher.java                  |   7 +++++++
 netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java |  14 ++++++++++++++
 4 files changed, 40 insertions(+), 5 deletions(-)

diffs (121 lines):

diff -r 528e354ff469 -r 89eb20442421 ChangeLog
--- a/ChangeLog	Thu Feb 02 16:15:27 2012 -0500
+++ b/ChangeLog	Mon Feb 13 11:35:49 2012 -0500
@@ -1,3 +1,17 @@
+2012-02-10  Danesh Dadachanji  <ddadacha at redhat.com>
+
+	Fix path to NEW_LINE_IFS for when one builds outside of src directory.
+	* Makefile.am: Use top src directory instead of top build directory
+	for NEW_LINE_IFS
+
+2012-02-06  Danesh Dadachanji  <ddadacha at redhat.com>
+
+	Fixed regression in running webstart applets from JNLP files.
+	* netx/net/sourceforge/jnlp/Launcher.java (createApplet): Added call to
+	set applet variable in the AppletInstance's AppletEnvironment.
+	* netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java
+	(setApplet): New method, set AppletEnvironment's applet variable only once.
+
 2012-02-02  Danesh Dadachanji  <ddadacha at redhat.com>
 
 	* netx/net/sourceforge/jnlp/LaunchException.java: Fix message
diff -r 528e354ff469 -r 89eb20442421 Makefile.am
--- a/Makefile.am	Thu Feb 02 16:15:27 2012 -0500
+++ b/Makefile.am	Mon Feb 13 11:35:49 2012 -0500
@@ -475,7 +475,7 @@
 stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs
 	types=(simple signed); \
 	for which in "$${types[@]}" ; do \
-	  . $(abs_top_builddir)/NEW_LINE_IFS ; \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
 	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
 	  IFS="$$IFS_BACKUP" ; \
 	  for dir in "$${simpleReproducers[@]}" ; do \
@@ -503,7 +503,7 @@
 	keystore=$(abs_top_builddir)/$(KEYSTORE_NAME); \
 	pass=123456789; \
 	$(BOOT_DIR)/bin/keytool -genkey -alias $$alias -keystore $$keystore -keypass $$pass -storepass $$pass -dname "cn=$$alias, ou=$$alias, o=$$alias, c=$$alias" ; \
-	  . $(abs_top_builddir)/NEW_LINE_IFS ; \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
 	signedReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-signed.txt `); \
 	  IFS="$$IFS_BACKUP" ; \
 	for dir in "$${signedReproducers[@]}" ; do \
@@ -528,7 +528,7 @@
  netx-dist-tests-source-files.txt stamps/netx-dist-tests-compile.stamp
 	types=(simple signed); \
 	for which in "$${types[@]}" ; do \
-	  . $(abs_top_builddir)/NEW_LINE_IFS ; \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
 	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
 	  IFS="$$IFS_BACKUP" ; \
 	  for dir in "$${simpleReproducers[@]}" ; do \
@@ -677,7 +677,7 @@
 	k=0 ; \
 	types=(simple signed); \
 	for which in "$${types[@]}" ; do \
-	  . $(abs_top_builddir)/NEW_LINE_IFS ; \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
 	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
 	  IFS="$$IFS_BACKUP" ; \
 	  for dir in "$${simpleReproducers[@]}" ; do \
@@ -740,7 +740,7 @@
 	k=0 ; \
 	types=(simple signed); \
 	for which in "$${types[@]}" ; do \
-	  . $(abs_top_builddir)/NEW_LINE_IFS ; \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
 	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
 	  IFS="$$IFS_BACKUP" ; \
 	  for dir in "$${simpleReproducers[@]}" ; do \
diff -r 528e354ff469 -r 89eb20442421 netx/net/sourceforge/jnlp/Launcher.java
--- a/netx/net/sourceforge/jnlp/Launcher.java	Thu Feb 02 16:15:27 2012 -0500
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Mon Feb 13 11:35:49 2012 -0500
@@ -708,6 +708,9 @@
 
             ThreadGroup group = Thread.currentThread().getThreadGroup();
 
+            // appletInstance is needed by ServiceManager when looking up 
+            // services. This could potentially be done in applet constructor
+            // so initialize appletInstance before creating applet.
             AppletInstance appletInstance;
             if (cont == null)
                 appletInstance = new AppletInstance(file, group, loader, null);
@@ -716,10 +719,14 @@
 
             loader.setApplication(appletInstance);
 
+            // Initialize applet now that ServiceManager has access to its
+            // appletInstance.
             String appletName = file.getApplet().getMainClass();
             Class appletClass = loader.loadClass(appletName);
             Applet applet = (Applet) appletClass.newInstance();
+            // Finish setting up appletInstance.
             appletInstance.setApplet(applet);
+            appletInstance.getAppletEnvironment().setApplet(applet);
             
             setContextClassLoaderForAllThreads(appletInstance.getThreadGroup(), appletInstance.getClassLoader());
 
diff -r 528e354ff469 -r 89eb20442421 netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java
--- a/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java	Thu Feb 02 16:15:27 2012 -0500
+++ b/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java	Mon Feb 13 11:35:49 2012 -0500
@@ -207,6 +207,20 @@
     }
 
     /**
+     * Set the applet of this environment; can only be called once.
+     */
+    public void setApplet(Applet applet) {
+        if (this.applet != null) {
+            if (JNLPRuntime.isDebug()) {
+                Exception ex = new IllegalStateException("Applet can only be set once.");
+                ex.printStackTrace();
+            }
+            return;
+        }
+        this.applet = applet;
+    }
+
+    /**
      * Returns an enumeration that contains only the applet
      * from the JNLP file.
      */



More information about the distro-pkg-dev mailing list