camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [3/3] git commit: CAMEL-7848 Disable the AllowDefaultCodec option in camel-netty-http
Date Mon, 29 Sep 2014 14:11:34 GMT
CAMEL-7848 Disable the AllowDefaultCodec option in camel-netty-http


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/84aa5c6c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/84aa5c6c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/84aa5c6c

Branch: refs/heads/camel-2.13.x
Commit: 84aa5c6ca18b308dd371d4cf8341f559e66a5dd1
Parents: baac167
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Mon Sep 29 09:03:25 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Mon Sep 29 22:10:58 2014 +0800

----------------------------------------------------------------------
 .../camel/component/netty/http/NettyHttpConfiguration.java  | 9 +++++++++
 .../apache/camel/component/netty/NettyConfiguration.java    | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/84aa5c6c/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
index 420a448..9c5dd4c 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
@@ -160,5 +160,14 @@ public class NettyHttpConfiguration extends NettyConfiguration {
     public void setChunkedMaxContentLength(int chunkedMaxContentLength) {
         this.chunkedMaxContentLength = chunkedMaxContentLength;
     }
+    
+    // Don't support allowDefaultCodec
+    public boolean isAllowDefaultCodec() {
+        return false;
+    }
+    
+    public void setAllowDefaultCodec(boolean allowDefaultCodec) {
+        throw new UnsupportedOperationException("You cannot setAllowDefaultCodec here.");
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/84aa5c6c/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 83ab62d..cf3aa0d 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
@@ -161,7 +161,7 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration
implem
 
         // add default encoders and decoders
         if (encoders.isEmpty() && decoders.isEmpty()) {
-            if (allowDefaultCodec) {
+            if (isAllowDefaultCodec()) {
                 // are we textline or object?
                 if (isTextline()) {
                     Charset charset = getEncoding() != null ? Charset.forName(getEncoding())
: CharsetUtil.UTF_8;


Mime
View raw message