/hg/icedtea-web: remove duplicate R methods; create a single cla...

omajid at icedtea.classpath.org omajid at icedtea.classpath.org
Mon Oct 25 11:38:21 PDT 2010


changeset e0bb780d2f04 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e0bb780d2f04
author: Omair Majid <omajid at redhat.com>
date: Mon Oct 25 14:37:57 2010 -0400

	remove duplicate R methods; create a single class to handle
	translation

	2010-10-25 Omair Majid <omajid at redhat.com>

	 * net/sourceforge/jnlp/ExtensionDesc.java: Import Translator.R
	and use that.
	    * net/sourceforge/jnlp/JNLPFile.java: Import Translator.R. (R):
	Remove.
	    * net/sourceforge/jnlp/JREDesc.java: Import Translator.R.
	(checkHeapSize): Use R instead of JNLPRuntime.getMessage.
	    * net/sourceforge/jnlp/Launcher.java: Import Translator.R. (R):
	Remove.
	    * net/sourceforge/jnlp/Parser.java: Import Translator.R
	(R(String)): Remove. (R(String,Object)): Remove.
	(R(String,Object,Object)): Remove.
	(R(String,Object,Object,Object)): Remove.
	    * net/sourceforge/jnlp/cache/CacheEntry.java: Import Translator.R
	(CacheEntry): Use R instead of JNLPRuntime.getMessage.
	    * net/sourceforge/jnlp/cache/CacheUtil.java: Import Translator.R
	(R(String)): Remove. (R(String,Object)): Remove.
	    * net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java: Import
	Translator.R and use that instead of JNLPRuntime.getMessage.
	    * net/sourceforge/jnlp/runtime/Boot.java: Import Translator.R.
	(R(String)): Remove. (R(String, Object)): Remove. (run): Use
	R instead of JNLPRuntime.getMessage.
	    * net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Import
	Translator.R. (R): Remove.
	    * net/sourceforge/jnlp/runtime/JNLPSecurityManager.java: Import
	Translator.R. Use it instead of JNLPRuntime.getMeesage. (R):
	Remove.
	    * net/sourceforge/jnlp/security/AccessWarningPane.java: Import
	Translator.R.
	    * net/sourceforge/jnlp/security/CertWarningPane.java: Likewise.
	    * net/sourceforge/jnlp/security/HttpsCertVerifier.java: Import
	Translator.R. (R(String)): Remove.
	(R(String,String,String)): Remove.
	    * net/sourceforge/jnlp/security/MoreInfoPane.java: Import
	Translator.R.
	    * net/sourceforge/jnlp/security/SecurityDialogPanel.java
	(R(String)): Remove. (R(String,Object)): Remove.
	    * net/sourceforge/jnlp/services/ServiceUtil.java (R): Remove.
	    * net/sourceforge/jnlp/services/SingleInstanceLock.java: Import
	Translator.R (R(String)): Remove. (R(String,Object)):
	Remove.
	    * net/sourceforge/jnlp/tools/JarSigner.java: Import Translator.R.
	(R): Remove.
	    * net/sourceforge/jnlp/runtime/Translator.java: New file
	(R(String,Object...)): New method.


diffstat:

22 files changed, 129 insertions(+), 83 deletions(-)
ChangeLog                                                     |   53 ++++++++++
netx/net/sourceforge/jnlp/ExtensionDesc.java                  |    5 
netx/net/sourceforge/jnlp/JNLPFile.java                       |    5 
netx/net/sourceforge/jnlp/JREDesc.java                        |    8 -
netx/net/sourceforge/jnlp/Launcher.java                       |    6 -
netx/net/sourceforge/jnlp/Parser.java                         |   10 -
netx/net/sourceforge/jnlp/cache/CacheEntry.java               |    4 
netx/net/sourceforge/jnlp/cache/CacheUtil.java                |   10 -
netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java |    6 -
netx/net/sourceforge/jnlp/runtime/Boot.java                   |    8 -
netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java        |    5 
netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java            |    2 
netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java    |    6 -
netx/net/sourceforge/jnlp/runtime/Translator.java             |   31 +++++
netx/net/sourceforge/jnlp/security/AccessWarningPane.java     |    2 
netx/net/sourceforge/jnlp/security/CertWarningPane.java       |    2 
netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java     |   11 --
netx/net/sourceforge/jnlp/security/MoreInfoPane.java          |    2 
netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java   |   15 --
netx/net/sourceforge/jnlp/services/ServiceUtil.java           |    4 
netx/net/sourceforge/jnlp/services/SingleInstanceLock.java    |   10 -
netx/net/sourceforge/jnlp/tools/JarSigner.java                |    7 -

diffs (truncated from 589 to 500 lines):

diff -r e9910d92b046 -r e0bb780d2f04 ChangeLog
--- a/ChangeLog	Mon Oct 25 12:14:33 2010 -0400
+++ b/ChangeLog	Mon Oct 25 14:37:57 2010 -0400
@@ -1,3 +1,56 @@ 2010-10-25  Andrew Su <asu at redhat.com>
+2010-10-25  Omair Majid  <omajid at redhat.com>
+
+	* net/sourceforge/jnlp/ExtensionDesc.java: Import Translator.R and use
+	that.
+	* net/sourceforge/jnlp/JNLPFile.java: Import Translator.R.
+	(R): Remove.
+	* net/sourceforge/jnlp/JREDesc.java: Import Translator.R.
+	(checkHeapSize): Use R instead of JNLPRuntime.getMessage.
+	* net/sourceforge/jnlp/Launcher.java: Import Translator.R.
+	(R): Remove.
+	* net/sourceforge/jnlp/Parser.java: Import Translator.R
+	(R(String)): Remove.
+	(R(String,Object)): Remove.
+	(R(String,Object,Object)): Remove.
+	(R(String,Object,Object,Object)): Remove.
+	* net/sourceforge/jnlp/cache/CacheEntry.java: Import Translator.R
+	(CacheEntry): Use R instead of JNLPRuntime.getMessage.
+	* net/sourceforge/jnlp/cache/CacheUtil.java: Import Translator.R
+	(R(String)): Remove.
+	(R(String,Object)): Remove.
+	* net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java: Import
+	Translator.R and use that instead of JNLPRuntime.getMessage.
+	* net/sourceforge/jnlp/runtime/Boot.java: Import Translator.R.
+	(R(String)): Remove.
+	(R(String, Object)): Remove.
+	(run): Use R instead of JNLPRuntime.getMessage.
+	* net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Import Translator.R.
+	(R): Remove.
+	* net/sourceforge/jnlp/runtime/JNLPSecurityManager.java: Import
+	Translator.R.  Use it instead of JNLPRuntime.getMeesage.
+	(R): Remove.
+	* net/sourceforge/jnlp/security/AccessWarningPane.java: Import
+	Translator.R.
+	* net/sourceforge/jnlp/security/CertWarningPane.java: Likewise.
+	* net/sourceforge/jnlp/security/HttpsCertVerifier.java: Import
+	Translator.R.
+	(R(String)): Remove.
+	(R(String,String,String)): Remove.
+	* net/sourceforge/jnlp/security/MoreInfoPane.java: Import Translator.R.
+	* net/sourceforge/jnlp/security/SecurityDialogPanel.java
+	(R(String)): Remove.
+	(R(String,Object)): Remove.
+	* net/sourceforge/jnlp/services/ServiceUtil.java
+	(R): Remove.
+	* net/sourceforge/jnlp/services/SingleInstanceLock.java: Import
+	Translator.R
+	(R(String)): Remove.
+	(R(String,Object)): Remove.
+	* net/sourceforge/jnlp/tools/JarSigner.java: Import Translator.R.
+	(R): Remove.
+	* net/sourceforge/jnlp/runtime/Translator.java: New file
+	(R(String,Object...)): New method.
+
 2010-10-25  Andrew Su <asu at redhat.com>
 
 	* Makefile.am:
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/ExtensionDesc.java
--- a/netx/net/sourceforge/jnlp/ExtensionDesc.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/ExtensionDesc.java	Mon Oct 25 14:37:57 2010 -0400
@@ -17,12 +17,13 @@
 
 package net.sourceforge.jnlp;
 
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
 import java.io.*;
 import java.net.*;
 import java.util.*;
 
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
-
 
 /**
  * The extension element.
@@ -128,7 +129,7 @@ public class ExtensionDesc {
 
             // check for it being an extension descriptor
             if (!file.isComponent() && !file.isInstaller())
-                throw new ParseException(JNLPRuntime.getMessage("JInvalidExtensionDescriptor", new Object[] {name, location} ));
+                throw new ParseException(R("JInvalidExtensionDescriptor", name, location));
         }
 
     }
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/JNLPFile.java
--- a/netx/net/sourceforge/jnlp/JNLPFile.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/JNLPFile.java	Mon Oct 25 14:37:57 2010 -0400
@@ -17,6 +17,8 @@
 
 package net.sourceforge.jnlp;
 
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
@@ -31,6 +33,7 @@ import net.sourceforge.jnlp.cache.Resour
 import net.sourceforge.jnlp.cache.ResourceTracker;
 import net.sourceforge.jnlp.cache.UpdatePolicy;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
+
 
 /**
  * Provides methods to access the information in a Java Network
@@ -59,8 +62,6 @@ public class JNLPFile {
     //
     // todo: currently does not filter resources by jvm version.
     //
-
-    private static String R(String key) { return JNLPRuntime.getMessage(key); }
 
     /** the location this JNLP file was created from */
     protected URL sourceLocation = null;
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/JREDesc.java
--- a/netx/net/sourceforge/jnlp/JREDesc.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/JREDesc.java	Mon Oct 25 14:37:57 2010 -0400
@@ -17,11 +17,11 @@
 
 package net.sourceforge.jnlp;
 
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
 import java.io.*;
 import java.net.*;
 import java.util.*;
-
-import net.sourceforge.jnlp.runtime.JNLPRuntime;
 
 /**
  * The J2SE/Java element.
@@ -143,7 +143,7 @@ public class JREDesc {
         if ((lastChar < '0' || lastChar > '9')) {
             lastCharacterIsDigit = false;
             if (lastChar != 'k' && lastChar!= 'm' ) {
-                throw new ParseException(JNLPRuntime.getMessage("PBadHeapSize",new Object[] {heapSize}));
+                throw new ParseException(R("PBadHeapSize", heapSize));
             }
         }
 
@@ -157,7 +157,7 @@ public class JREDesc {
             // check that the number is a number!
             Integer.valueOf(size);
         } catch (NumberFormatException numberFormat) {
-            throw new ParseException(JNLPRuntime.getMessage("PBadHeapSize", new Object[] {heapSize}), numberFormat);
+            throw new ParseException(R("PBadHeapSize", heapSize), numberFormat);
         }
 
     }
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/Launcher.java
--- a/netx/net/sourceforge/jnlp/Launcher.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Mon Oct 25 14:37:57 2010 -0400
@@ -16,6 +16,8 @@
 
 
 package net.sourceforge.jnlp;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.applet.Applet;
 import java.awt.Container;
@@ -51,6 +53,7 @@ import javax.swing.SwingUtilities;
 
 import sun.awt.SunToolkit;
 
+
 /**
  * Launches JNLPFiles either in the foreground or background.<p>
  *
@@ -66,9 +69,6 @@ public class Launcher {
 public class Launcher {
 
     // defines class Launcher.BgRunner, Launcher.TgThread
-
-    /** shortcut for resources */
-    private static String R(String key) { return JNLPRuntime.getMessage(key); }
 
     /** shared thread group */
     /*package*/ static final ThreadGroup mainGroup = new ThreadGroup(R("LAllThreadGroup"));
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/Parser.java
--- a/netx/net/sourceforge/jnlp/Parser.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/Parser.java	Mon Oct 25 14:37:57 2010 -0400
@@ -18,6 +18,8 @@
 
 package net.sourceforge.jnlp;
 
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
 import java.io.*;
 import java.net.*;
 import java.util.*;
@@ -27,9 +29,7 @@ import java.util.*;
 //import gd.xml.tiny.*;
 import net.sourceforge.jnlp.UpdateDesc.Check;
 import net.sourceforge.jnlp.UpdateDesc.Policy;
-import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.nanoxml.*;
-
 
 /**
  * Contains methods to parse an XML document into a JNLPFile.
@@ -39,12 +39,6 @@ import net.sourceforge.nanoxml.*;
  * @version $Revision: 1.13 $
  */
 class Parser {
-
-    private static String R(String key) { return JNLPRuntime.getMessage(key); }
-    private static String R(String key, Object p1) { return R(key, p1, null); }
-    private static String R(String key, Object p1, Object p2) { return R(key, p1, p2, null); }
-    private static String R(String key, Object p1, Object p2, Object p3) { return JNLPRuntime.getMessage(key, new Object[] { p1, p2, p3 }); }
-
 
     // defines netx.jnlp.Node class if using Tiny XML or Nano XML
 
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/cache/CacheEntry.java
--- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java	Mon Oct 25 14:37:57 2010 -0400
@@ -16,6 +16,8 @@
 
 
 package net.sourceforge.jnlp.cache;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.io.*;
 import java.net.*;
@@ -60,7 +62,7 @@ public class CacheEntry {
         File infoFile = CacheUtil.getCacheFile(location, version);
         infoFile = new File(infoFile.getPath()+".info"); // replace with something that can't be clobbered
 
-        properties = new PropertiesFile(infoFile, JNLPRuntime.getMessage("CAutoGen"));
+        properties = new PropertiesFile(infoFile, R("CAutoGen"));
     }
 
     /**
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/cache/CacheUtil.java
--- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java	Mon Oct 25 14:37:57 2010 -0400
@@ -16,6 +16,8 @@
 
 
 package net.sourceforge.jnlp.cache;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.io.*;
 import java.net.*;
@@ -37,14 +39,6 @@ import net.sourceforge.jnlp.util.FileUti
  * @version $Revision: 1.17 $
  */
 public class CacheUtil {
-
-    private static String R(String key) {
-        return JNLPRuntime.getMessage(key);
-    }
-
-    private static String R(String key, Object param) {
-        return JNLPRuntime.getMessage(key, new Object[] {param});
-    }
 
     /**
      * Compares a URL using string compare of its protocol, host,
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java
--- a/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java	Mon Oct 25 14:37:57 2010 -0400
@@ -16,6 +16,8 @@
 
 
 package net.sourceforge.jnlp.cache;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.awt.*;
 import java.awt.event.*;
@@ -49,8 +51,8 @@ public class DefaultDownloadIndicator im
     // todo: this should be synchronized at some point but conflicts
     // aren't very likely.
 
-    private static String downloading = JNLPRuntime.getMessage("CDownloading");
-    private static String complete = JNLPRuntime.getMessage("CComplete");
+    private static String downloading = R("CDownloading");
+    private static String complete = R("CComplete");
 
     /** time to wait after completing but before window closes */
     private static final int CLOSE_DELAY = 750;
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/runtime/Boot.java
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Mon Oct 25 14:37:57 2010 -0400
@@ -16,6 +16,8 @@
 
 
 package net.sourceforge.jnlp.runtime;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.io.File;
 import java.io.IOException;
@@ -62,9 +64,6 @@ public final class Boot implements Privi
 
     // todo: decide whether a spawned netx (external launch)
     // should inherit the same options as this instance (store argv?)
-
-    private static String R(String key) { return JNLPRuntime.getMessage(key); }
-    private static String R(String key, Object param) { return JNLPRuntime.getMessage(key, new Object[] {param}); }
 
     private static final String version = "0.5";
 
@@ -225,8 +224,7 @@ public final class Boot implements Privi
             if (JNLPRuntime.isDebug())
                 ex.printStackTrace();
 
-            fatalError(JNLPRuntime.getMessage("RUnexpected",
-                        new Object[] {ex.toString(), ex.getStackTrace()[0]} ));
+            fatalError(R("RUnexpected", ex.toString(), ex.getStackTrace()[0]));
         }
 
         return null;
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Mon Oct 25 14:37:57 2010 -0400
@@ -16,6 +16,8 @@
 
 
 package net.sourceforge.jnlp.runtime;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -77,9 +79,6 @@ public class JNLPClassLoader extends URL
     // todo: initializePermissions should get the permissions from
     // extension classes too so that main file classes can load
     // resources in an extension.
-
-    /** shortcut for resources */
-    private static String R(String key) { return JNLPRuntime.getMessage(key); }
 
     /** map from JNLPFile url to shared classloader */
     private static Map<String,JNLPClassLoader> urlToLoader =
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Mon Oct 25 14:37:57 2010 -0400
@@ -522,7 +522,7 @@ public class JNLPRuntime {
      *
      * @param args the formatting arguments to the resource string
      */
-    public static String getMessage(String key, Object args[]) {
+    public static String getMessage(String key, Object... args) {
         return MessageFormat.format(getMessage(key), args);
     }
 
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java	Mon Oct 25 14:37:57 2010 -0400
@@ -16,6 +16,8 @@
 
 
 package net.sourceforge.jnlp.runtime;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.awt.Frame;
 import java.awt.Window;
@@ -88,14 +90,12 @@ class JNLPSecurityManager extends AWTSec
     // another way for different apps to have different properties
     // in java.lang.Sytem with the same names.
 
-    private static String R(String key) { return JNLPRuntime.getMessage(key); }
-
     /** only class that can exit the JVM, if set */
     private Object exitClass = null;
 
     /** this exception prevents exiting the JVM */
     private SecurityException closeAppEx = // making here prevents huge stack traces
-        new SecurityException(JNLPRuntime.getMessage("RShutdown"));
+        new SecurityException(R("RShutdown"));
 
     /** weak list of windows created */
     private WeakList<Window> weakWindows = new WeakList<Window>();
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/runtime/Translator.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/runtime/Translator.java	Mon Oct 25 14:37:57 2010 -0400
@@ -0,0 +1,31 @@
+// Copyright (C) 2010 Red Hat, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+package net.sourceforge.jnlp.runtime;
+
+/**
+ * Utility class to provide simple methods to help localize messages
+ */
+public class Translator {
+
+    /**
+     * @return the localized string for the message
+     */
+    public static String R(String message, Object... params) {
+        return JNLPRuntime.getMessage(message, params);
+    }
+
+}
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/security/AccessWarningPane.java
--- a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/security/AccessWarningPane.java	Mon Oct 25 14:37:57 2010 -0400
@@ -36,6 +36,8 @@ exception statement from your version.
 */
 
 package net.sourceforge.jnlp.security;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/security/CertWarningPane.java
--- a/netx/net/sourceforge/jnlp/security/CertWarningPane.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/security/CertWarningPane.java	Mon Oct 25 14:37:57 2010 -0400
@@ -36,6 +36,8 @@ exception statement from your version.
 */
 
 package net.sourceforge.jnlp.security;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java
--- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java	Mon Oct 25 14:37:57 2010 -0400
@@ -37,6 +37,8 @@ exception statement from your version.
 
 package net.sourceforge.jnlp.security;
 
+import static net.sourceforge.jnlp.runtime.Translator.R;
+
 import java.io.IOException;
 import java.security.cert.CertPath;
 import java.security.cert.Certificate;
@@ -50,7 +52,6 @@ import java.util.Collection;
 import java.util.Collection;
 import java.util.List;
 
-import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.tools.KeyTool;
 import sun.security.util.DerValue;
 import sun.security.util.HostnameChecker;
@@ -198,14 +199,6 @@ public class HttpsCertVerifier implement
         details.add(detail);
     }
 
-    private static String R(String key) {
-      return JNLPRuntime.getMessage(key);
-    }
-
-    private static String R(String key, String arg1, String arg2) {
-        return JNLPRuntime.getMessage(key, new Object[] { arg1, arg2 });
-    }
-
     public Certificate getPublisher() {
       if (chain.length > 0)
         return (Certificate)chain[0];
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/security/MoreInfoPane.java
--- a/netx/net/sourceforge/jnlp/security/MoreInfoPane.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/security/MoreInfoPane.java	Mon Oct 25 14:37:57 2010 -0400
@@ -36,6 +36,8 @@ exception statement from your version.
 */
 
 package net.sourceforge.jnlp.security;
+
+import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.awt.BorderLayout;
 import java.awt.Dimension;
diff -r e9910d92b046 -r e0bb780d2f04 netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java
--- a/netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java	Mon Oct 25 12:14:33 2010 -0400
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java	Mon Oct 25 14:37:57 2010 -0400
@@ -44,9 +44,6 @@ import javax.swing.JComponent;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
 
-
-import net.sourceforge.jnlp.runtime.JNLPRuntime;
-
 /**
  * Provides a JPanel for use in JNLP warning dialogs.
  */



More information about the distro-pkg-dev mailing list