camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: [3/4] camel git commit: Polished the configuration default setting of camel-netty component
Date Tue, 31 Mar 2015 09:52:04 GMT
Hi

There is no need to set default value for booleans which are false as
default. That is implied. But if its true you need to set it.

+    @UriParam(defaultValue = "false")
     private boolean clientMode;

Can just be

+    @UriParam
     private boolean clientMode;

On Tue, Mar 31, 2015 at 11:44 AM,  <ningjiang@apache.org> wrote:
> Polished the configuration default setting of camel-netty component
>
>
> Project: http://git-wip-us.apache.org/repos/asf/camel/repo
> Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b046a673
> Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b046a673
> Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b046a673
>
> Branch: refs/heads/master
> Commit: b046a673e57977a7d5009dc6338fcf41cfa92730
> Parents: 5f59322
> Author: Willem Jiang <willem.jiang@gmail.com>
> Authored: Tue Mar 31 17:33:58 2015 +0800
> Committer: Willem Jiang <willem.jiang@gmail.com>
> Committed: Tue Mar 31 17:42:44 2015 +0800
>
> ----------------------------------------------------------------------
>  .../org/apache/camel/component/netty/NettyConfiguration.java  | 6 +++---
>  .../org/apache/camel/component/netty4/NettyConfiguration.java | 7 ++++---
>  2 files changed, 7 insertions(+), 6 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> ----------------------------------------------------------------------
> diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> index ccbbef9..847ca45 100644
> --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> @@ -90,11 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration
implem
>      private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
>      @UriParam(defaultValue = "true")
>      private boolean producerPoolEnabled = true;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean udpConnectionlessSending;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean clientMode;
> -
> +
>      /**
>       * Returns a copy of this configuration
>       */
>
> http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
> ----------------------------------------------------------------------
> diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
> index 2e2244d..d315f43 100644
> --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
> +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
> @@ -72,7 +72,7 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration
implem
>      private LoggingLevel serverExceptionCaughtLogLevel = LoggingLevel.WARN;
>      @UriParam(defaultValue = "DEBUG")
>      private LoggingLevel serverClosedChannelExceptionCaughtLogLevel = LoggingLevel.DEBUG;
> -    @UriParam(defaultValue = "false")
> +    @UriParam(defaultValue = "true")
>      private boolean allowDefaultCodec = true;
>      @UriParam
>      private ClientInitializerFactory clientInitializerFactory;
> @@ -90,10 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration
implem
>      private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
>      @UriParam(defaultValue = "true")
>      private boolean producerPoolEnabled = true;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean udpConnectionlessSending;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean clientMode;
> +
>
>      /**
>       * Returns a copy of this configuration
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message