Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1fe30377 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1fe30377 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1fe30377 Branch: refs/heads/master Commit: 1fe30377164ccbbcbefc0183c8c784988767c28c Parents: 04088ff Author: Claus Ibsen <davscl...@apache.org> Authored: Thu May 25 11:16:27 2017 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Thu May 25 11:32:17 2017 +0200 ---------------------------------------------------------------------- .../jetty/rest/RestJettyOptionsTest.java | 6 +++--- .../netty/http/DefaultNettyHttpBinding.java | 2 +- .../streams/api/CamelReactiveStreamsService.java | 2 +- .../support/ReactiveStreamsTestService.java | 2 +- .../servlet/rest/OptionsMethodWebRequest.java | 6 +++--- .../apache/camel/spring/SpringTestSupport.java | 2 +- .../TwitterDirectMessageEndpoint.java | 19 ++++++++++++++++++- .../twitter/search/TwitterSearchEndpoint.java | 19 ++++++++++++++++++- .../streaming/TwitterStreamingEndpoint.java | 19 ++++++++++++++++++- .../timeline/TwitterTimelineEndpoint.java | 19 ++++++++++++++++++- .../twitter/CamelComponentVerifierTest.java | 5 +++-- .../twitter/UserProducerInOnlyTest.java | 5 +++-- .../component/twitter/UserProducerInOutTest.java | 6 +++--- 13 files changed, 91 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/rest/RestJettyOptionsTest.java ---------------------------------------------------------------------- diff --git a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/rest/RestJettyOptionsTest.java b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/rest/RestJettyOptionsTest.java index 7618601..7f6536e 100644 --- a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/rest/RestJettyOptionsTest.java +++ b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/rest/RestJettyOptionsTest.java @@ -5,9 +5,9 @@ * 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 - * <p> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p> + * + * 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. http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java index 5112762..15cea1b 100644 --- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java +++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java @@ -252,7 +252,7 @@ public class DefaultNettyHttpBinding implements NettyHttpBinding, Cloneable { public Message toCamelMessage(HttpResponse response, Exchange exchange, NettyHttpConfiguration configuration) throws Exception { LOG.trace("toCamelMessage: {}", response); - NettyHttpMessage answer = new NettyHttpMessage(exchange.getContext(),null, response); + NettyHttpMessage answer = new NettyHttpMessage(exchange.getContext(), null, response); answer.setExchange(exchange); if (configuration.isMapHeaders()) { populateCamelHeaders(response, answer.getHeaders(), exchange, configuration); http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java ---------------------------------------------------------------------- diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java index 199f96d..f851fa6 100644 --- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java +++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java @@ -20,9 +20,9 @@ import java.util.function.Function; import org.apache.camel.Exchange; import org.apache.camel.Service; +import org.apache.camel.component.reactive.streams.ReactiveStreamsCamelSubscriber; import org.apache.camel.component.reactive.streams.ReactiveStreamsConsumer; import org.apache.camel.component.reactive.streams.ReactiveStreamsProducer; -import org.apache.camel.component.reactive.streams.ReactiveStreamsCamelSubscriber; import org.apache.camel.spi.HasId; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java ---------------------------------------------------------------------- diff --git a/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java index 6065795..7ce988d 100644 --- a/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java +++ b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java @@ -19,10 +19,10 @@ package org.apache.camel.component.reactive.streams.support; import java.util.function.Function; import org.apache.camel.Exchange; +import org.apache.camel.component.reactive.streams.ReactiveStreamsCamelSubscriber; import org.apache.camel.component.reactive.streams.ReactiveStreamsConsumer; import org.apache.camel.component.reactive.streams.ReactiveStreamsProducer; import org.apache.camel.component.reactive.streams.api.CamelReactiveStreamsService; -import org.apache.camel.component.reactive.streams.ReactiveStreamsCamelSubscriber; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/OptionsMethodWebRequest.java ---------------------------------------------------------------------- diff --git a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/OptionsMethodWebRequest.java b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/OptionsMethodWebRequest.java index 4cba44d..c121fd0 100644 --- a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/OptionsMethodWebRequest.java +++ b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/OptionsMethodWebRequest.java @@ -5,9 +5,9 @@ * 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 - * <p> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p> + * + * 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. http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java b/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java index 243a53c..3feb1b4 100644 --- a/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java +++ b/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java @@ -52,7 +52,7 @@ public abstract class SpringTestSupport extends ContextTestSupport { // we want SpringTestSupport to startup faster and not use JMX by default and should stop seda quicker System.setProperty("CamelSedaPollTimeout", "10"); - if(!this.useJmx()) { + if (!this.useJmx()) { this.disableJMX(); } else { this.enableJMX(); http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/directmessage/TwitterDirectMessageEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/directmessage/TwitterDirectMessageEndpoint.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/directmessage/TwitterDirectMessageEndpoint.java index 86ede93..360da52 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/directmessage/TwitterDirectMessageEndpoint.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/directmessage/TwitterDirectMessageEndpoint.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.twitter.directmessage; import org.apache.camel.Consumer; @@ -13,7 +29,8 @@ import org.apache.camel.spi.UriPath; /** * The Twitter Direct Message Component consumes/produces user's direct messages. */ -@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-directmessage", title = "Twitter Direct Message", syntax = "twitter-directmessage:endpointId", consumerClass = DirectMessageConsumerHandler.class, label = "api,social") +@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-directmessage", title = "Twitter Direct Message", syntax = "twitter-directmessage:endpointId", + consumerClass = DirectMessageConsumerHandler.class, label = "api,social") public class TwitterDirectMessageEndpoint extends AbstractTwitterEndpoint { @UriPath(description = "The endpoint ID (not used).") http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/TwitterSearchEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/TwitterSearchEndpoint.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/TwitterSearchEndpoint.java index 536fe8a..1653a97 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/TwitterSearchEndpoint.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/search/TwitterSearchEndpoint.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.twitter.search; import org.apache.camel.Consumer; @@ -13,7 +29,8 @@ import org.apache.camel.spi.UriPath; /** * The Twitter Search component consumes search results. */ -@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-search", title = "Twitter Search", syntax = "twitter-search:endpointId", consumerClass = SearchConsumerHandler.class, label = "api,social") +@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-search", title = "Twitter Search", syntax = "twitter-search:endpointId", + consumerClass = SearchConsumerHandler.class, label = "api,social") public class TwitterSearchEndpoint extends AbstractTwitterEndpoint { @UriPath(description = "The endpoint ID (not used).") http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java index dc932b6..ef8faaf 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.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.twitter.streaming; import org.apache.camel.Consumer; @@ -15,7 +31,8 @@ import org.apache.camel.spi.UriPath; /** * The Twitter Streaming component consumes twitter statuses using Streaming API. */ -@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-streaming", title = "Twitter Streaming", syntax = "twitter-streaming:streamingType", consumerClass = AbstractStreamingConsumerHandler.class, consumerOnly = true, label = "api,social") +@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-streaming", title = "Twitter Streaming", syntax = "twitter-streaming:streamingType", + consumerClass = AbstractStreamingConsumerHandler.class, consumerOnly = true, label = "api,social") public class TwitterStreamingEndpoint extends AbstractTwitterEndpoint { @UriPath(description = "The streaming type to consume.") http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java index 5d030e7..92472ae 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.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.twitter.timeline; import org.apache.camel.Consumer; @@ -15,7 +31,8 @@ import org.apache.camel.spi.UriPath; /** * The Twitter Timeline component consumes twitter timeline or update the status of specific user. */ -@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-timeline", title = "Twitter Timeline", syntax = "twitter-timeline:timelineType", consumerClass = AbstractStatusConsumerHandler.class, label = "api,social") +@UriEndpoint(firstVersion = "2.10.0", scheme = "twitter-timeline", title = "Twitter Timeline", syntax = "twitter-timeline:timelineType", + consumerClass = AbstractStatusConsumerHandler.class, label = "api,social") public class TwitterTimelineEndpoint extends AbstractTwitterEndpoint { @UriPath(description = "The timeline type to produce/consume.") http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/CamelComponentVerifierTest.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/CamelComponentVerifierTest.java b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/CamelComponentVerifierTest.java index f131ab8..be8eb81 100644 --- a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/CamelComponentVerifierTest.java +++ b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/CamelComponentVerifierTest.java @@ -16,8 +16,6 @@ */ package org.apache.camel.component.twitter; -import static org.apache.camel.ComponentVerifier.VerificationError.asAttribute; - import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -29,7 +27,10 @@ import org.apache.camel.component.twitter.search.TwitterSearchComponent; import org.junit.Assert; import org.junit.Test; +import static org.apache.camel.ComponentVerifier.VerificationError.asAttribute; + public class CamelComponentVerifierTest extends CamelTwitterTestSupport { + @Override public boolean isUseRouteBuilder() { return false; http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOnlyTest.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOnlyTest.java b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOnlyTest.java index 1358835..b236df4 100644 --- a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOnlyTest.java +++ b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOnlyTest.java @@ -16,8 +16,6 @@ */ package org.apache.camel.component.twitter; -import static org.hamcrest.core.Is.is; - import java.util.Date; import java.util.List; @@ -30,10 +28,13 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static org.hamcrest.core.Is.is; + /** * Tests posting a twitter update with the default In Message Exchange Pattern */ public class UserProducerInOnlyTest extends CamelTwitterTestSupport { + private static final Logger LOG = LoggerFactory.getLogger(UserProducerInOnlyTest.class); @EndpointInject(uri = "mock:result") http://git-wip-us.apache.org/repos/asf/camel/blob/1fe30377/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOutTest.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOutTest.java b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOutTest.java index 049c1f1..516d0e5 100644 --- a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOutTest.java +++ b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserProducerInOutTest.java @@ -16,8 +16,6 @@ */ package org.apache.camel.component.twitter; -import static org.hamcrest.core.Is.is; - import java.util.Date; import java.util.List; @@ -29,13 +27,15 @@ import org.apache.camel.component.mock.MockEndpoint; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - import twitter4j.Status; +import static org.hamcrest.core.Is.is; + /** * Tests posting a twitter update and getting the status update id from the Twitter API response */ public class UserProducerInOutTest extends CamelTwitterTestSupport { + private static final Logger LOG = LoggerFactory.getLogger(UserProducerInOutTest.class); @EndpointInject(uri = "mock:result")