diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-07 13:41:02 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-10 23:43:39 +0200 |
commit | 4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa (patch) | |
tree | 1008fb1ceb97da428ab451b0d1b83b1bb3b5e089 /scripting/workben | |
parent | Java cleanup, remove unnecessary imports (diff) | |
download | core-4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa.tar.gz core-4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa.zip |
Java cleanup, convert ArrayList and Vector to use generics
Change-Id: Ic668b46872ee0bfd259ca335aed9d68fb545c3a4
Diffstat (limited to 'scripting/workben')
-rw-r--r-- | scripting/workben/installer/IdeUpdater.java | 8 | ||||
-rw-r--r-- | scripting/workben/installer/InstUtil.java | 1 | ||||
-rw-r--r-- | scripting/workben/installer/XmlUpdater.java | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/scripting/workben/installer/IdeUpdater.java b/scripting/workben/installer/IdeUpdater.java index 5d94cffcb7ec..721a265d644c 100644 --- a/scripting/workben/installer/IdeUpdater.java +++ b/scripting/workben/installer/IdeUpdater.java @@ -39,7 +39,7 @@ public class IdeUpdater extends Thread { private JLabel statusLabel; - private Vector listeners; + private Vector<InstallListener> listeners; private Thread internalThread; private boolean threadSuspended; private JProgressBar progressBar; @@ -69,7 +69,7 @@ public class IdeUpdater extends Thread { System.out.println( "IdeUpdater installPath is " + installPath + " isNetbeansPath is " + isNetbeansPath ); this.installPath = installPath; this.statusLabel = statusLabel; - listeners = new Vector(); + listeners = new Vector<InstallListener>(); threadSuspended = false; progressBar=pBar; progressBar.setStringPainted(true); @@ -173,10 +173,10 @@ public class IdeUpdater extends Thread { private void onInstallComplete() { - Enumeration e = listeners.elements(); + Enumeration<InstallListener> e = listeners.elements(); while (e.hasMoreElements()) { - InstallListener listener = (InstallListener)e.nextElement(); + InstallListener listener = e.nextElement(); listener.installationComplete(null); } }// onInstallComplete diff --git a/scripting/workben/installer/InstUtil.java b/scripting/workben/installer/InstUtil.java index c3d673cc377c..05d265d147ff 100644 --- a/scripting/workben/installer/InstUtil.java +++ b/scripting/workben/installer/InstUtil.java @@ -331,7 +331,6 @@ public class InstUtil { public static Properties getOfficeVersions(File sversionFile) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(sversionFile)); - Vector values; String sectionName = null; Properties results = new Properties(); diff --git a/scripting/workben/installer/XmlUpdater.java b/scripting/workben/installer/XmlUpdater.java index 5f1c88c41e7e..5161350975d5 100644 --- a/scripting/workben/installer/XmlUpdater.java +++ b/scripting/workben/installer/XmlUpdater.java @@ -38,7 +38,7 @@ public class XmlUpdater extends Thread { private JLabel statusLabel; - private Vector listeners; + private Vector<InstallListener> listeners; private Thread internalThread; private boolean threadSuspended; private JProgressBar progressBar; @@ -107,7 +107,7 @@ public class XmlUpdater extends Thread { this.statusLabel = statusLabel; this.netInstall = netInstall; this.bindingsInstall = bindingsInstall; - listeners = new Vector(); + listeners = new Vector<InstallListener>(); threadSuspended = false; progressBar=pBar; progressBar.setStringPainted(true); @@ -432,10 +432,10 @@ public class XmlUpdater extends Thread { private void onInstallComplete() { - Enumeration e = listeners.elements(); + Enumeration<InstallListener> e = listeners.elements(); while (e.hasMoreElements()) { - InstallListener listener = (InstallListener)e.nextElement(); + InstallListener listener = e.nextElement(); listener.installationComplete(null); } }// onInstallComplete |