Repository: camel Updated Branches: refs/heads/master 23456b66f -> 42c6af57b
CAMEL-9102: Added loggingSizeLimit >= -1 validation in setLoggingSizeLimit() to avoid further errors Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d3644c1f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d3644c1f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d3644c1f Branch: refs/heads/master Commit: d3644c1f8ab1a2538948a8f78f2694ddf6506004 Parents: 066dc59 Author: Bruno Marco Visioli <bvisi...@stefanini.com> Authored: Wed Sep 2 17:40:42 2015 -0300 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Sep 4 10:18:39 2015 +0200 ---------------------------------------------------------------------- .../main/java/org/apache/camel/component/cxf/CxfEndpoint.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/d3644c1f/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java index b8e080d..ad1588c 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java @@ -41,7 +41,6 @@ import javax.xml.ws.handler.Handler; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; - import org.apache.camel.CamelContext; import org.apache.camel.CamelException; import org.apache.camel.Consumer; @@ -966,9 +965,12 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy } /** - * To limit the total size of number of bytes the logger will output when logging feature has been enabled. + * To limit the total size of number of bytes the logger will output when logging feature has been enabled and -1 for no limit. */ public void setLoggingSizeLimit(int loggingSizeLimit) { + if(loggingSizeLimit < -1) { + throw new IllegalArgumentException("LoggingSizeLimit must be greater or equal to -1."); + } this.loggingSizeLimit = loggingSizeLimit; }