/hg/icedtea-web: Added getter for java-abrt-connector on demand ...

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Mon Mar 10 14:54:35 UTC 2014


changeset bc97499d95f4 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=bc97499d95f4
author: Jiri Vanek <jvanek at redhat.com>
date: Mon Mar 10 16:02:39 2014 +0100

	Added getter for java-abrt-connector on demand whitelist of fields


diffstat:

 ChangeLog                                                |  10 ++++++
 netx/net/sourceforge/jnlp/Launcher.java                  |   3 +-
 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java       |  24 ++++++++++++++++
 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java |   2 +
 4 files changed, 37 insertions(+), 2 deletions(-)

diffs (93 lines):

diff -r 2217cdd13ad6 -r bc97499d95f4 ChangeLog
--- a/ChangeLog	Mon Mar 10 15:48:24 2014 +0100
+++ b/ChangeLog	Mon Mar 10 16:02:39 2014 +0100
@@ -1,3 +1,13 @@
+2014-03-10  Jiri Vanek  <jvanek at redhat.com>
+
+	Added getter for java-abrt-connector on demand whitelist of fields.
+	* netx/net/sourceforge/jnlp/Launcher.java: (launch) saving (location.toExternalForm())
+	via JNLPRuntime.saveHistory
+	* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: (history) new static field
+	with getter (getHistory) and "setter" (saveHistory)
+	* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: (handleInitializationMessage)
+	saving (documentBase) via JNLPRuntime.saveHistory
+
 2014-03-10  Jiri Vanek  <jvanek at redhat.com>
 
 	Actualized man page for javaws
diff -r 2217cdd13ad6 -r bc97499d95f4 netx/net/sourceforge/jnlp/Launcher.java
--- a/netx/net/sourceforge/jnlp/Launcher.java	Mon Mar 10 15:48:24 2014 +0100
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Mon Mar 10 16:02:39 2014 +0100
@@ -281,6 +281,7 @@
      * @return the application instance
      */
     public ApplicationInstance launch(URL location) throws LaunchException {
+        JNLPRuntime.saveHistory(location.toExternalForm());
         return launch(fromUrl(location));
     }
 
@@ -944,6 +945,4 @@
 
     };
 
- 
-
 }
diff -r 2217cdd13ad6 -r bc97499d95f4 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Mon Mar 10 15:48:24 2014 +0100
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Mon Mar 10 16:02:39 2014 +0100
@@ -91,6 +91,14 @@
         loadResources();
     }
 
+    /**
+     * java-abrt-connector can print out specific application String method, it is good to save visited urls for reproduce purposes.
+     * For javaws we can read the destination jnlp from commandline
+     * However for plugin (url arrive via pipes). Also for plugin we can not be sure which opened tab/window
+     * have caused the crash. Thats why the individual urls are added, not replaced.
+     */
+    private static String history = "";
+
     /** the localized resource strings */
     private static ResourceBundle resources;
 
@@ -831,4 +839,20 @@
         OutputController.getLogger().close();
         System.exit(i);
     }
+
+
+    public static void saveHistory(String documentBase) {
+        JNLPRuntime.history += " " + documentBase + " ";
+    }
+
+    /**
+     * Used by java-abrt-connector via reflection
+     * @return history
+     */
+    private static String getHistory() {
+        return history;
+    }
+    
+    
+
 }
diff -r 2217cdd13ad6 -r bc97499d95f4 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Mon Mar 10 15:48:24 2014 +0100
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Mon Mar 10 16:02:39 2014 +0100
@@ -118,6 +118,7 @@
 import sun.misc.Ref;
 
 import com.sun.jndi.toolkit.url.UrlUtil;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.util.logging.OutputController;
 
 /*
@@ -467,6 +468,7 @@
                             "Height = ", height, "\n",
                             "DocumentBase = ", documentBase, "\n",
                             "Params = ", paramString);
+        JNLPRuntime.saveHistory(documentBase);
 
         PluginAppletPanelFactory factory = new PluginAppletPanelFactory();
         AppletMessageHandler amh = new AppletMessageHandler("appletviewer");


More information about the distro-pkg-dev mailing list