Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-02-07 19:21:32 +0000
committerAlexander Kurtakov2018-02-07 19:21:32 +0000
commit2df4e713c2e9b6cf0a6f554c2f44797cb33e566c (patch)
tree1010db1e4ac5b606eccfc1e76a53f10b4ae1c489 /tests
parentf9959fe40ae5943210c66dc0d0fd0aad14f2766f (diff)
downloadeclipse.platform.team-2df4e713c2e9b6cf0a6f554c2f44797cb33e566c.tar.gz
eclipse.platform.team-2df4e713c2e9b6cf0a6f554c2f44797cb33e566c.tar.xz
eclipse.platform.team-2df4e713c2e9b6cf0a6f554c2f44797cb33e566c.zip
Change-Id: I2ce29644a969e3df4d47bfcbe2557ebf439c7d0b Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchLinesTest.java4
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchUtils.java8
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ReflectionUtils.java8
-rw-r--r--tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java6
4 files changed, 13 insertions, 13 deletions
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchLinesTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchLinesTest.java
index bd41c5864..fa30c83bf 100644
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchLinesTest.java
+++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchLinesTest.java
@@ -133,7 +133,7 @@ public class PatchLinesTest extends TestCase {
}
private int getNewLength(IHunk hunk) {
- Class cls = hunk.getClass();
+ Class<?> cls = hunk.getClass();
try {
Field fld = cls.getDeclaredField("fNewLength");
fld.setAccessible(true);
@@ -152,7 +152,7 @@ public class PatchLinesTest extends TestCase {
}
private int getOldLength(IHunk hunk) {
- Class cls = hunk.getClass();
+ Class<?> cls = hunk.getClass();
try {
Field fld = cls.getDeclaredField("fOldLength");
fld.setAccessible(true);
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchUtils.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchUtils.java
index c1d0c7564..d0c033f55 100644
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchUtils.java
+++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 IBM Corporation and others.
+ * Copyright (c) 2009, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -43,7 +43,7 @@ public class PatchUtils {
fileName = old;
}
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
@@ -92,7 +92,7 @@ public class PatchUtils {
return true;
}
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
}
@@ -127,7 +127,7 @@ public class PatchUtils {
return true;
}
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
return null;
}
}
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ReflectionUtils.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ReflectionUtils.java
index 8d19b3415..87d5980b1 100644
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ReflectionUtils.java
+++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/ReflectionUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,12 +19,12 @@ public class ReflectionUtils {
public static Object callMethod(Object object, String name, Object args[])
throws IllegalArgumentException, IllegalAccessException,
InvocationTargetException, NoSuchMethodException {
- Class types[] = new Class[args.length];
+ Class<?> types[] = new Class[args.length];
for (int i = 0; i < args.length; i++) {
types[i] = args[i].getClass();
}
Method method = null;
- Class clazz = object.getClass();
+ Class<?> clazz = object.getClass();
NoSuchMethodException ex = null;
while (method == null && clazz != null) {
try {
@@ -56,7 +56,7 @@ public class ReflectionUtils {
public static Object getField(Object object, String name, boolean deep)
throws IllegalArgumentException, IllegalAccessException,
SecurityException, NoSuchFieldException {
- Class clazz = object.getClass();
+ Class<?> clazz = object.getClass();
NoSuchFieldException ex = null;
while (clazz != null) {
try {
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java
index 5e8217b66..2531f5416 100644
--- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java
+++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/WorkspaceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -36,14 +36,14 @@ public class WorkspaceTest extends ResourceTest {
protected static IProgressMonitor DEFAULT_MONITOR = new NullProgressMonitor();
protected static final IProgressMonitor DEFAULT_PROGRESS_MONITOR = new NullProgressMonitor();
- public static Test suite(Class c) {
+ public static Test suite(Class<?> c) {
String testName = System.getProperty("eclipse.team.testName");
if (testName == null) {
TestSuite suite = new TestSuite(c);
return suite;
}
try {
- return (Test)c.getConstructor(new Class[] { String.class }).newInstance(new Object[] {testName});
+ return (Test)c.getConstructor(String.class).newInstance(testName);
} catch (Exception e) {
fail(e.getMessage());
// Above will throw so below is never actually reached

Back to the top