Remove useless casts in o.e.osgi.tests.

Change-Id: I8dd7f07cad6c05cf902bc1f146b1a98cfebad664
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/ObjectPoolTestCase.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/ObjectPoolTestCase.java
index ffeaebd..26adf1c 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/ObjectPoolTestCase.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/util/ObjectPoolTestCase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2017 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
@@ -25,7 +25,7 @@
 		// new objects are added to the object pool; interning should add the object to the pool and return the same object
 		for (int i = 0; i < num; i++) {
 			String test1 = getName() + "_" + i; //$NON-NLS-1$
-			String test2 = (String) ObjectPool.intern(test1);
+			String test2 = ObjectPool.intern(test1);
 			assertTrue("Strings are not the same: " + test1, test1 == test2); //$NON-NLS-1$
 			objects.add(test2);
 		}
@@ -33,7 +33,7 @@
 		// after doing a GC the interned objects should still be in the pool; interning a duplicate should return the objects that were added above
 		for (int i = 0; i < num; i++) {
 			String test1 = getName() + "_" + i; //$NON-NLS-1$
-			String test2 = (String) ObjectPool.intern(test1);
+			String test2 = ObjectPool.intern(test1);
 			assertFalse("Strings are the same: " + test1, test1 == test2); //$NON-NLS-1$
 			assertTrue("Strings are not the same: " + test1, test2 == objects.get(i)); //$NON-NLS-1$
 		}
@@ -43,7 +43,7 @@
 		// after doing a GC the interned objects should have been removed from the object pool
 		for (int i = 0; i < num; i++) {
 			String test1 = getName() + "_" + i; //$NON-NLS-1$
-			String test2 = (String) ObjectPool.intern(test1);
+			String test2 = ObjectPool.intern(test1);
 			assertTrue("Strings are not the same: " + test1, test1 == test2); //$NON-NLS-1$
 			objects.add(test2);
 		}
@@ -60,11 +60,11 @@
 		// new objects are added to the object pool; interning should add the object to the pool and return the same object
 		for (int i = 0; i < num; i++) {
 			String testString1 = getName() + "_" + i; //$NON-NLS-1$
-			String testString2 = (String) ObjectPool.intern(testString1);
+			String testString2 = ObjectPool.intern(testString1);
 			assertTrue("Strings are not the same: " + testString1, testString1 == testString2); //$NON-NLS-1$
 			strings.add(testString2);
 			Version testVersion1 = new Version(i, i, i, getName() + "_" + i); //$NON-NLS-1$
-			Version testVersion2 = (Version) ObjectPool.intern(testVersion1);
+			Version testVersion2 = ObjectPool.intern(testVersion1);
 			assertTrue("Versions are not the same: " + testVersion1, testVersion1 == testVersion2); //$NON-NLS-1$
 			versions.add(testVersion2);
 		}
@@ -72,11 +72,11 @@
 		// after doing a GC the interned objects should still be in the pool; interning a duplicate should return the objects that were added above
 		for (int i = 0; i < num; i++) {
 			String testString1 = getName() + "_" + i; //$NON-NLS-1$
-			String testString2 = (String) ObjectPool.intern(testString1);
+			String testString2 = ObjectPool.intern(testString1);
 			assertFalse("Strings are the same: " + testString1, testString1 == testString2); //$NON-NLS-1$
 			assertTrue("Strings are not the same: " + testString1, testString2 == strings.get(i)); //$NON-NLS-1$
 			Version testVersion1 = new Version(i, i, i, getName() + "_" + i); //$NON-NLS-1$
-			Version testVersion2 = (Version) ObjectPool.intern(testVersion1);
+			Version testVersion2 = ObjectPool.intern(testVersion1);
 			assertFalse("Versions are the same: " + testVersion1, testVersion1 == testVersion2); //$NON-NLS-1$
 			assertTrue("Versions are not the same: " + testVersion1, testVersion2 == versions.get(i)); //$NON-NLS-1$
 		}
@@ -87,11 +87,11 @@
 		doGC();
 		for (int i = 0; i < num; i++) {
 			String testString1 = getName() + "_" + i; //$NON-NLS-1$
-			String testString2 = (String) ObjectPool.intern(testString1);
+			String testString2 = ObjectPool.intern(testString1);
 			assertTrue("Strings are not the same: " + testString1, testString1 == testString2); //$NON-NLS-1$
 			strings.add(testString2);
 			Version testVersion1 = new Version(i, i, i, getName() + "_" + i); //$NON-NLS-1$
-			Version testVersion2 = (Version) ObjectPool.intern(testVersion1);
+			Version testVersion2 = ObjectPool.intern(testVersion1);
 			assertTrue("Versions are not the same: " + testVersion1, testVersion1 == testVersion2); //$NON-NLS-1$
 			versions.add(testVersion2);
 		}