commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1088161 - /commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
Date Sat, 02 Apr 2011 22:17:09 GMT
Author: simonetripodi
Date: Sat Apr  2 22:17:09 2011
New Revision: 1088161

URL: http://svn.apache.org/viewvc?rev=1088161&view=rev
Log:
removed useless casts

Modified:
    commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java

Modified: commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java?rev=1088161&r1=1088160&r2=1088161&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
(original)
+++ commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
Sat Apr  2 22:17:09 2011
@@ -56,7 +56,7 @@ public class TestAll {
         TestInterface1 ti = null;
         
         try {
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class,
+            ti = DiscoverSingleton.find(TestInterface1.class,
                                                         TestImpl1_1.class.getName());
 
             assertTrue(ti.getClass().getName() + "!=" + TestImpl1_1.class.getName(),
@@ -73,7 +73,7 @@ public class TestAll {
         TestInterface1 ti = null;
 
         try {
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class,
+            ti = DiscoverSingleton.find(TestInterface1.class,
                                                         TestImpl1_2.class.getName());
 
             assertTrue(ti.getClass().getName() + "!=" + TestImpl1_2.class.getName(),
@@ -90,7 +90,7 @@ public class TestAll {
         TestInterface1 ti = null;
         
         try {
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class,
+            ti = DiscoverSingleton.find(TestInterface1.class,
                                                         TestImpl1_1.class.getName());
 
             assertTrue("1. " + ti.getClass().getName() + "!=" + TestImpl1_1.class.getName(),
@@ -98,7 +98,7 @@ public class TestAll {
             
             // no release, should get cached value..
             
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class,
+            ti = DiscoverSingleton.find(TestInterface1.class,
                                                         TestImpl1_2.class.getName());
 
             // factory should be cached
@@ -116,7 +116,7 @@ public class TestAll {
         TestInterface1 ti = null;
         
         try {
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class,
+            ti = DiscoverSingleton.find(TestInterface1.class,
                                                         TestImpl1_1.class.getName());
 
             assertTrue("1. " + ti.getClass().getName() + "!=" + TestImpl1_1.class.getName(),
@@ -124,7 +124,7 @@ public class TestAll {
             
             DiscoverSingleton.release();
             
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class,
+            ti = DiscoverSingleton.find(TestInterface1.class,
                                                         TestImpl1_2.class.getName());
 
             // factory should be cached
@@ -147,7 +147,7 @@ public class TestAll {
             props.setProperty(TestInterface1.class.getName(),
                               TestImpl1_2.class.getName());
             
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class, props);
+            ti = DiscoverSingleton.find(TestInterface1.class, props);
 
             assertTrue(ti.getClass().getName() + "!=" + TestImpl1_2.class.getName(),
                        ti.getClass().getName().equals(TestImpl1_2.class.getName()));
@@ -166,7 +166,7 @@ public class TestAll {
             ManagedProperties.setProperty(TestInterface1.class.getName(),
                                           TestImpl1_2.class.getName());
                               
-            ti = (TestInterface1)DiscoverSingleton.find(TestInterface1.class);
+            ti = DiscoverSingleton.find(TestInterface1.class);
 
             assertTrue(ti.getClass().getName() + "!=" + TestImpl1_2.class.getName(),
                        ti.getClass().getName().equals(TestImpl1_2.class.getName()));



Mime
View raw message