summaryrefslogtreecommitdiff
path: root/scripting/workben
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-07 13:41:02 +0200
committerMichael Stahl <mstahl@redhat.com>2012-09-10 23:43:39 +0200
commit4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa (patch)
tree1008fb1ceb97da428ab451b0d1b83b1bb3b5e089 /scripting/workben
parent6bf09ecf1d97455af4a07ae3564886ee69e0a33b (diff)
Java cleanup, convert ArrayList and Vector to use generics
Change-Id: Ic668b46872ee0bfd259ca335aed9d68fb545c3a4
Diffstat (limited to 'scripting/workben')
-rw-r--r--scripting/workben/installer/IdeUpdater.java8
-rw-r--r--scripting/workben/installer/InstUtil.java1
-rw-r--r--scripting/workben/installer/XmlUpdater.java8
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