Author: hadrian Date: Wed Dec 15 00:04:10 2010 New Revision: 1049355 URL: http://svn.apache.org/viewvc?rev=1049355&view=rev Log: CAMEL-3428. Checkstyle fixes:wq
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=1049355&r1=1049354&r2=1049355&view=diff ============================================================================== --- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Wed Dec 15 00:04:10 2010 @@ -16,7 +16,6 @@ */ package org.apache.camel.impl; -import static java.lang.String.format; import java.io.IOException; import java.io.InputStream; @@ -467,8 +466,8 @@ public class DefaultCamelContext extends public <T extends Endpoint> T getEndpoint(String name, Class<T> endpointType) { Endpoint endpoint = getEndpoint(name); - if(endpoint == null){ - throw new IllegalArgumentException("No endpoint found with name: " + name); + if (endpoint == null) { + throw new IllegalArgumentException("No endpoint found with name: " + name); } if (endpoint instanceof InterceptSendToEndpoint) { endpoint = ((InterceptSendToEndpoint) endpoint).getDelegate(); @@ -476,8 +475,8 @@ public class DefaultCamelContext extends if (endpointType.isInstance(endpoint)) { return endpointType.cast(endpoint); } else { - throw new IllegalArgumentException("The endpoint is not of type: " + endpointType + " but is: " - + endpoint.getClass().getCanonicalName()); + throw new IllegalArgumentException("The endpoint is not of type: " + endpointType + + " but is: " + endpoint.getClass().getCanonicalName()); } } Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java?rev=1049355&r1=1049354&r2=1049355&view=diff ============================================================================== --- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java (original) +++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java Wed Dec 15 00:04:10 2010 @@ -89,13 +89,13 @@ public class DefaultCamelContextTest ext } } - public void testGetEndPointByTypeUnknown(){ - DefaultCamelContext camelContext = new DefaultCamelContext(); - try { - camelContext.getEndpoint("unknown", Endpoint.class); - fail(); - } catch (IllegalArgumentException e) { - } + public void testGetEndPointByTypeUnknown() { + DefaultCamelContext camelContext = new DefaultCamelContext(); + try { + camelContext.getEndpoint("unknown", Endpoint.class); + fail(); + } catch (IllegalArgumentException e) { + } } @@ -324,4 +324,4 @@ public class DefaultCamelContextTest ext assertEquals(false, ctx.isStarted()); assertEquals(false, ctx.isSuspended()); } -} \ No newline at end of file +}