camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1366377 - in /camel/trunk/camel-core/src/test/java/org/apache/camel/management: JmxInstrumentationCustomMBeanTest.java ManagedFileIdempotentConsumerTest.java
Date Fri, 27 Jul 2012 13:10:58 GMT
Author: bvahdat
Date: Fri Jul 27 13:10:57 2012
New Revision: 1366377

URL: http://svn.apache.org/viewvc?rev=1366377&view=rev
Log:
Removed the obsolete usage of the CastUtils.cast(Set<?> p) utility.

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedFileIdempotentConsumerTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java?rev=1366377&r1=1366376&r2=1366377&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
Fri Jul 27 13:10:57 2012
@@ -26,7 +26,6 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.direct.DirectEndpoint;
 import org.apache.camel.impl.DefaultComponent;
-import org.apache.camel.util.CastUtils;
 
 /**
  * JmxInstrumentationCustomMBeanTest will verify that all endpoints are registered
@@ -55,7 +54,7 @@ public class JmxInstrumentationCustomMBe
 
         resolveMandatoryEndpoint("custom://end", CustomEndpoint.class);
 
-        Set<ObjectName> s = CastUtils.cast(mbsc.queryNames(new ObjectName(domainName
+ ":type=endpoints,*"), null));
+        Set<ObjectName> s = mbsc.queryNames(new ObjectName(domainName + ":type=endpoints,*"),
null);
         assertEquals("Could not find 2 endpoints: " + s, 2, s.size());
 
         // get custom
@@ -93,16 +92,16 @@ public class JmxInstrumentationCustomMBe
     public void testMBeansRegistered() throws Exception {
         assertDefaultDomain();
 
-        Set<ObjectName> s = CastUtils.cast(mbsc.queryNames(new ObjectName(domainName
+ ":type=endpoints,*"), null));
+        Set<ObjectName> s = mbsc.queryNames(new ObjectName(domainName + ":type=endpoints,*"),
null);
         assertEquals("Could not find 2 endpoints: " + s, 2, s.size());
 
-        s = CastUtils.cast(mbsc.queryNames(new ObjectName(domainName + ":type=context,*"),
null));
+        s = mbsc.queryNames(new ObjectName(domainName + ":type=context,*"), null);
         assertEquals("Could not find 1 context: " + s, 1, s.size());
 
-        s = CastUtils.cast(mbsc.queryNames(new ObjectName(domainName + ":type=processors,*"),
null));
+        s = mbsc.queryNames(new ObjectName(domainName + ":type=processors,*"), null);
         assertEquals("Could not find 1 processors: " + s, 2, s.size());
 
-        s = CastUtils.cast(mbsc.queryNames(new ObjectName(domainName + ":type=routes,*"),
null));
+        s = mbsc.queryNames(new ObjectName(domainName + ":type=routes,*"), null);
         assertEquals("Could not find 1 route: " + s, 1, s.size());
     }
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedFileIdempotentConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedFileIdempotentConsumerTest.java?rev=1366377&r1=1366376&r2=1366377&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedFileIdempotentConsumerTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedFileIdempotentConsumerTest.java
Fri Jul 27 13:10:57 2012
@@ -29,7 +29,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.processor.idempotent.FileIdempotentRepository;
 import org.apache.camel.spi.IdempotentRepository;
-import org.apache.camel.util.CastUtils;
 import org.apache.camel.util.FileUtil;
 
 /**
@@ -45,7 +44,7 @@ public class ManagedFileIdempotentConsum
         MBeanServer mbeanServer = getMBeanServer();
 
         // services
-        Set<ObjectName> names = CastUtils.cast(mbeanServer.queryNames(new ObjectName("org.apache.camel"
+ ":type=services,*"), null));
+        Set<ObjectName> names = mbeanServer.queryNames(new ObjectName("org.apache.camel"
+ ":type=services,*"), null);
         ObjectName on = null;
         for (ObjectName name : names) {
             if (name.toString().contains("FileIdempotentRepository")) {



Mime
View raw message