[izpack-changes] izpack-src/src/lib/com/izforge/izpack/uninstaller SelfModifier.java,1.12,1.13 UninstallerFrame.java,1.23,1.24

jponge nobody at sheep.berlios.de
Tue Mar 21 19:14:55 CET 2006


Update of /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/uninstaller
In directory sheep:/tmp/cvs-serv3622/src/lib/com/izforge/izpack/uninstaller

Modified Files:
	SelfModifier.java UninstallerFrame.java 
Log Message:
Some fixes adviced by IntelliJ IDEA 5.1 code inspector.

Index: SelfModifier.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/uninstaller/SelfModifier.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- SelfModifier.java	12 Mar 2006 16:32:27 -0000	1.12
+++ SelfModifier.java	21 Mar 2006 18:14:49 -0000	1.13
@@ -297,7 +297,7 @@
 
         Class[] params = method.getParameterTypes();
         if (params.length != 1 || !params[0].isArray()
-                || !params[0].getComponentType().getName().equals("java.lang.String"))
+                || !"java.lang.String".equals(params[0].getComponentType().getName()))
             throw new IllegalArgumentException("Method must accept String array");
 
         Class clazz = method.getDeclaringClass();
@@ -437,7 +437,7 @@
         String resource = clazz.getName().replace('.', '/') + ".class";
 
         URL url = ClassLoader.getSystemResource(resource);
-        if (!url.getProtocol().equals("jar")) return null;
+        if (!"jar".equals(url.getProtocol())) return null;
 
         String path = url.getFile();
         // starts at "file:..." (use getPath() as of 1.3)

Index: UninstallerFrame.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/uninstaller/UninstallerFrame.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- UninstallerFrame.java	12 Mar 2006 16:32:27 -0000	1.23
+++ UninstallerFrame.java	21 Mar 2006 18:14:49 -0000	1.24
@@ -75,9 +75,6 @@
     /** The language pack. */
     protected static LocaleDatabase langpack;
 
-    /** The warning label. */
-    private JLabel warningLabel;
-
     /** The target destroy checkbox. */
     protected JCheckBox targetDestroyCheckbox;
 
@@ -90,12 +87,6 @@
     /** The quit button. */
     protected JButton quitButton;
 
-    /** The layout. */
-    private GridBagLayout layout;
-
-    /** the layout constraints. */
-    private GridBagConstraints gbConstraints;
-
     /** The buttons hover color. */
     private Color buttonsHColor = new Color(230, 230, 230);
 
@@ -137,9 +128,9 @@
     {
         // We initialize our layout
         JPanel contentPane = (JPanel) getContentPane();
-        layout = new GridBagLayout();
+        GridBagLayout layout = new GridBagLayout();
         contentPane.setLayout(layout);
-        gbConstraints = new GridBagConstraints();
+        GridBagConstraints gbConstraints = new GridBagConstraints();
         gbConstraints.insets = new Insets(5, 5, 5, 5);
 
         // We prepare our action handler
@@ -157,7 +148,7 @@
 
         // We put our components
 
-        warningLabel = new JLabel(langpack.getString("uninstaller.warning"), icons
+        JLabel warningLabel = new JLabel(langpack.getString("uninstaller.warning"), icons
                 .getImageIcon("warning"), JLabel.TRAILING);
         buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0);
         gbConstraints.anchor = GridBagConstraints.WEST;




More information about the izpack-changes mailing list