summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorHendrik Still2013-07-24 10:18:58 (EDT)
committer Gerrit Code Review @ Eclipse.org2013-07-31 09:10:14 (EDT)
commitf04f4c0dd9c5590df1697d06d63a6e050f300863 (patch)
tree1df2d86837c95c5c94580c1fdc429f6a4dcf794a
parent47c1b8d194989182bf5da24fa51c3a65350782ee (diff)
downloadeclipse.platform.ui-f04f4c0dd9c5590df1697d06d63a6e050f300863.zip
eclipse.platform.ui-f04f4c0dd9c5590df1697d06d63a6e050f300863.tar.gz
eclipse.platform.ui-f04f4c0dd9c5590df1697d06d63a6e050f300863.tar.bz2
Bug 413649 - Fix compiler warnings in org.eclipse.jface.layout caused byrefs/changes/24/14824/2
moving JFace to Java 1.5 Change-Id: Ie7fcf89c99c8ac7eadb0a7630ce5b6e2114a6d66 Signed-off-by: Hendrik Still <hendrik.still@gammas.de>
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/layout/LayoutGenerator.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/layout/LayoutGenerator.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/layout/LayoutGenerator.java
index acf6edd..f1f932b 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/layout/LayoutGenerator.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/layout/LayoutGenerator.java
@@ -126,12 +126,12 @@ import org.eclipse.swt.widgets.Scrollable;
boolean hScroll = hasStyle(control, SWT.H_SCROLL);
boolean vScroll = hasStyle(control, SWT.V_SCROLL);
- boolean containsText = hasMethod(control, "setText", new Class[] { String.class }); //$NON-NLS-1$
+ boolean containsText = hasMethod(control, "setText", new Class<?>[] { String.class}); //$NON-NLS-1$
// If the control has a setText method, an addModifyListener method, and
// does not have
// the SWT.READ_ONLY flag, assume it contains user-editable text.
- boolean userEditable = !hasStyle(control, SWT.READ_ONLY) && containsText && hasMethod(control, "addModifyListener", new Class[] { ModifyListener.class }); //$NON-NLS-1$
+ boolean userEditable = !hasStyle(control, SWT.READ_ONLY) && containsText && hasMethod(control, "addModifyListener", new Class<?>[] { ModifyListener.class }); //$NON-NLS-1$
// For controls containing user-editable text...
if (userEditable) {
@@ -184,8 +184,8 @@ import org.eclipse.swt.widgets.Scrollable;
return GridDataFactory.fillDefaults().grab(grabHorizontal, vScroll).align(SWT.FILL, vAlign).hint(hHint, vScroll ? defaultSize.y : SWT.DEFAULT);
}
- private static boolean hasMethod(Control control, String name, Class[] parameterTypes) {
- Class c = control.getClass();
+ private static boolean hasMethod(Control control, String name, Class<?>[] parameterTypes) {
+ Class<? extends Control> c = control.getClass();
try {
return c.getMethod(name, parameterTypes) != null;
} catch (SecurityException e) {