Fixed CS errors of camel-ahc-ws
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/571dd89e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/571dd89e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/571dd89e Branch: refs/heads/master Commit: 571dd89e83810c7c76c6ae1aad3eba0b12500efe Parents: de56e0b Author: Willem Jiang <willem.ji...@gmail.com> Authored: Wed May 28 10:06:37 2014 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Wed May 28 10:55:00 2014 +0800 ---------------------------------------------------------------------- .../camel/component/ahc/ws/WsEndpoint.java | 10 +++++----- .../camel/component/ahc/ws/WsProducer.java | 4 ++-- .../camel/component/ahc/ws/TestServlet.java | 16 ++++++++++++++++ .../component/ahc/ws/WsProducerConsumerTest.java | 19 ++++++++++++++++--- .../component/ahc/ws/WsProducerTestBase.java | 3 ++- .../camel/component/ahc/ws/WssProducerTest.java | 1 - 6 files changed, 41 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/571dd89e/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsEndpoint.java b/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsEndpoint.java index 7a66432..d3cd243 100644 --- a/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsEndpoint.java +++ b/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsEndpoint.java @@ -53,6 +53,11 @@ public class WsEndpoint extends AhcEndpoint { private WebSocket websocket; private Set<WsConsumer> consumers; private boolean useStreaming; + + public WsEndpoint(String endpointUri, WsComponent component) { + super(endpointUri, component, null); + this.consumers = new HashSet<WsConsumer>(); + } private static boolean probeClass(String name) { try { @@ -63,11 +68,6 @@ public class WsEndpoint extends AhcEndpoint { } } - public WsEndpoint(String endpointUri, WsComponent component) { - super(endpointUri, component, null); - this.consumers = new HashSet<WsConsumer>(); - } - @Override public WsComponent getComponent() { return (WsComponent) super.getComponent(); http://git-wip-us.apache.org/repos/asf/camel/blob/571dd89e/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsProducer.java b/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsProducer.java index 3503530..43f3259 100644 --- a/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsProducer.java +++ b/components/camel-ahc-ws/src/main/java/org/apache/camel/component/ahc/ws/WsProducer.java @@ -19,12 +19,12 @@ package org.apache.camel.component.ahc.ws; import java.io.IOException; import java.io.InputStream; +import com.ning.http.client.websocket.WebSocket; + import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.impl.DefaultProducer; -import com.ning.http.client.websocket.WebSocket; - /** * */ http://git-wip-us.apache.org/repos/asf/camel/blob/571dd89e/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/TestServlet.java ---------------------------------------------------------------------- diff --git a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/TestServlet.java b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/TestServlet.java index 9a4347a..7c075f5 100644 --- a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/TestServlet.java +++ b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/TestServlet.java @@ -1,3 +1,19 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.camel.component.ahc.ws; import java.io.ByteArrayOutputStream; http://git-wip-us.apache.org/repos/asf/camel/blob/571dd89e/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java ---------------------------------------------------------------------- diff --git a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java index cc60a15..54d8b09 100644 --- a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java +++ b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java @@ -1,5 +1,18 @@ /** - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.camel.component.ahc.ws; @@ -22,9 +35,9 @@ import org.junit.Test; */ public class WsProducerConsumerTest extends CamelTestSupport { protected static final String TEST_MESSAGE = "Hello World!"; - + protected static final int PORT = AvailablePortFinder.getNextAvailable(); protected Server server; - protected int PORT = AvailablePortFinder.getNextAvailable(); + protected List<Object> messages; public void startTestServer() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/571dd89e/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerTestBase.java ---------------------------------------------------------------------- diff --git a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerTestBase.java b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerTestBase.java index 06ae0c3..422d0fe 100644 --- a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerTestBase.java +++ b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerTestBase.java @@ -45,11 +45,12 @@ import org.junit.Test; public abstract class WsProducerTestBase extends Assert { protected static final String TEST_MESSAGE = "Hello World!"; + protected static final int PORT = AvailablePortFinder.getNextAvailable(); protected CamelContext camelContext; protected ProducerTemplate template; protected Server server; - protected int PORT = AvailablePortFinder.getNextAvailable(); + protected List<Object> messages; public void startTestServer() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/571dd89e/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WssProducerTest.java ---------------------------------------------------------------------- diff --git a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WssProducerTest.java b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WssProducerTest.java index 60ff7de..efdbfd3 100644 --- a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WssProducerTest.java +++ b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WssProducerTest.java @@ -16,7 +16,6 @@ */ package org.apache.camel.component.ahc.ws; -import org.apache.camel.component.ahc.ws.WsComponent; import org.apache.camel.util.jsse.ClientAuthentication; import org.apache.camel.util.jsse.KeyManagersParameters; import org.apache.camel.util.jsse.KeyStoreParameters;