aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Still2013-07-24 19:12:07 (EDT)
committerGerrit Code Review @ Eclipse.org2013-07-25 16:19:42 (EDT)
commitb5baf13b76a64142b7f22ca57ef1878658840729 (patch)
tree8678e11dd71c2466af4b7e62b1df271f93e82373
parent71da37a15ed20cfb2e6d861b48924bb2b2167c07 (diff)
downloadeclipse.platform.ui-b5baf13b76a64142b7f22ca57ef1878658840729.zip
eclipse.platform.ui-b5baf13b76a64142b7f22ca57ef1878658840729.tar.gz
eclipse.platform.ui-b5baf13b76a64142b7f22ca57ef1878658840729.tar.bz2
Bug 413689 - Fix the compiler warnings in packagerefs/changes/52/14852/2
org.eclipse.jface.window caused by moving to Java 1.5 Change-Id: I327d7a2ff0c9cc91dee657e0fb9c7be3665ad9e4 Signed-off-by: Hendrik Still <hendrik.still@gammas.de>
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java4
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java2
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/window/WindowManager.java18
3 files changed, 12 insertions, 12 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java
index 9fc642d..a4c00e3 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java
@@ -47,7 +47,7 @@ public abstract class ToolTip {
private ToolTipOwnerControlListener listener;
- private HashMap data;
+ private HashMap<String, Object> data;
// Ensure that only one tooltip is active in time
private static Shell CURRENT_TOOLTIP;
@@ -147,7 +147,7 @@ public abstract class ToolTip {
*/
public void setData(String key, Object value) {
if (data == null) {
- data = new HashMap();
+ data = new HashMap<String, Object>();
}
data.put(key, value);
}
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
index 5c2ba87..7abe178 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
@@ -359,7 +359,7 @@ public abstract class Window implements IShellProvider {
// The equivalent in the multi-image version seems to be to remove the
// disposed images from the array passed to the shell.
if (defaultImages != null && defaultImages.length > 0) {
- ArrayList nonDisposedImages = new ArrayList(defaultImages.length);
+ ArrayList<Image> nonDisposedImages = new ArrayList<Image>(defaultImages.length);
for (int i = 0; i < defaultImages.length; ++i) {
if (defaultImages[i] != null && !defaultImages[i].isDisposed()) {
nonDisposedImages.add(defaultImages[i]);
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/window/WindowManager.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/window/WindowManager.java
index 5500d56..7fba520 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/window/WindowManager.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/window/WindowManager.java
@@ -39,13 +39,13 @@ public class WindowManager {
* List of windows managed by this window manager
* (element type: <code>Window</code>).
*/
- private ArrayList windows = new ArrayList();
+ private ArrayList<Window> windows = new ArrayList<Window>();
/**
* List of window managers who have this window manager
* as their parent (element type: <code>WindowManager</code>).
*/
- private List subManagers;
+ private List<WindowManager> subManagers;
/**
* Creates an empty window manager without a parent window
@@ -87,7 +87,7 @@ public class WindowManager {
*/
private void addWindowManager(WindowManager wm) {
if (subManagers == null) {
- subManagers = new ArrayList();
+ subManagers = new ArrayList<WindowManager>();
}
if (!subManagers.contains(wm)) {
subManagers.add(wm);
@@ -102,19 +102,19 @@ public class WindowManager {
* and <code>false</code> if any window refused to close
*/
public boolean close() {
- List t = (List) windows.clone(); // make iteration robust
- Iterator e = t.iterator();
+ List<Window> t = new ArrayList<Window>(windows); // make iteration robust
+ Iterator<Window> e = t.iterator();
while (e.hasNext()) {
- Window window = (Window) e.next();
+ Window window = e.next();
boolean closed = window.close();
if (!closed) {
return false;
}
}
if (subManagers != null) {
- e = subManagers.iterator();
- while (e.hasNext()) {
- WindowManager wm = (WindowManager) e.next();
+ Iterator<WindowManager> i = subManagers.iterator();
+ while (i.hasNext()) {
+ WindowManager wm = i.next();
boolean closed = wm.close();
if (!closed) {
return false;