CAMEL-6934: fixed cs
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/33d0b0df Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/33d0b0df Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/33d0b0df Branch: refs/heads/master Commit: 33d0b0df3d3b8500cc53b649122177c77cfd2ec6 Parents: 434fcc9 Author: Claus Ibsen <davscl...@apache.org> Authored: Fri Sep 5 09:57:28 2014 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Sep 5 10:13:07 2014 +0200 ---------------------------------------------------------------------- .../apache/camel/component/mina2/Mina2Configuration.java | 10 +++------- .../org/apache/camel/component/mina2/Mina2Producer.java | 10 +++++----- 2 files changed, 8 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/33d0b0df/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java ---------------------------------------------------------------------- diff --git a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java index 2e0b2e3..a1da1f4 100644 --- a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java +++ b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java @@ -265,16 +265,12 @@ public class Mina2Configuration implements Cloneable { this.orderedThreadPoolExecutor = orderedThreadPoolExecutor; } - public void setCachedAddress(boolean shouldCacheAddress){ + public void setCachedAddress(boolean shouldCacheAddress) { this.cachedAddress = shouldCacheAddress; } - public boolean getCachedAddress(){ - return this.cachedAddress; - } - - public boolean isCachedAddress(){ - return this.getCachedAddress(); + public boolean isCachedAddress() { + return cachedAddress; } // here we just shows the option setting of host, port, protocol http://git-wip-us.apache.org/repos/asf/camel/blob/33d0b0df/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java ---------------------------------------------------------------------- diff --git a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java index fc7c493..eaf9979 100644 --- a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java +++ b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java @@ -251,7 +251,7 @@ public class Mina2Producer extends DefaultProducer implements ServicePoolAware { } private void openConnection() { - if(this.address == null || !this.configuration.isCachedAddress()){ + if (this.address == null || !this.configuration.isCachedAddress()) { setSocketAddress(this.configuration.getProtocol()); } if (LOG.isDebugEnabled()) { @@ -450,12 +450,12 @@ public class Mina2Producer extends DefaultProducer implements ServicePoolAware { } } - private void setSocketAddress(String protocol){ - if(protocol.equals("tcp")){ + private void setSocketAddress(String protocol) { + if (protocol.equals("tcp")) { this.address = new InetSocketAddress(configuration.getHost(), configuration.getPort()); - }else if(configuration.isDatagramProtocol()){ + } else if (configuration.isDatagramProtocol()) { this.address = new InetSocketAddress(configuration.getHost(), configuration.getPort()); - }else if(protocol.equals("vm")){ + } else if (protocol.equals("vm")) { this.address = new VmPipeAddress(configuration.getPort()); } }