You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/03/23 09:11:47 UTC
[2/2] camel git commit: Corrected formatting issues
Corrected formatting issues
Change-Id: I614a4c87a6b1295bd8a5076e7e8ea8d6cd318ad2
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/76659a97
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/76659a97
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/76659a97
Branch: refs/heads/master
Commit: 76659a97228d01b94b1dc4e06009bc33431ff505
Parents: 950082f
Author: Matthew Luckam <Ma...@solers.com>
Authored: Wed Mar 22 17:24:44 2017 -0400
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Mar 23 10:01:36 2017 +0100
----------------------------------------------------------------------
.../camel/component/jetty/JettyHttpProducer.java | 4 ++--
.../jetty9/CamelInputStreamContentProvider.java | 19 +++++++++++++++++--
.../component/jetty9/JettyContentExchange9.java | 7 +++----
3 files changed, 22 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/76659a97/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java
index 662a221..e8e34ab 100644
--- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java
+++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpProducer.java
@@ -181,7 +181,7 @@ public class JettyHttpProducer extends DefaultAsyncProducer implements AsyncProc
String charset = IOHelper.getCharsetName(exchange, false);
httpExchange.setRequestContent(data, charset);
} else {
- // then fallback to input stream
+ // then fallback to input stream
InputStream is = exchange.getContext().getTypeConverter().mandatoryConvertTo(InputStream.class, exchange, exchange.getIn().getBody());
// setup the content length if it is possible
String length = exchange.getIn().getHeader(Exchange.CONTENT_LENGTH, String.class);
@@ -191,7 +191,7 @@ public class JettyHttpProducer extends DefaultAsyncProducer implements AsyncProc
httpExchange.setRequestContent(is, new Integer(length));
} else {
- //send chunked
+ //send chunked
httpExchange.setRequestContent(is);
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/76659a97/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/CamelInputStreamContentProvider.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/CamelInputStreamContentProvider.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/CamelInputStreamContentProvider.java
index 08d66c6..629a5a1 100644
--- a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/CamelInputStreamContentProvider.java
+++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/CamelInputStreamContentProvider.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.jetty9;
import java.io.InputStream;
@@ -14,8 +30,7 @@ public class CamelInputStreamContentProvider extends InputStreamContentProvider
}
@Override
- public long getLength()
- {
+ public long getLength() {
return length;
}
}
http://git-wip-us.apache.org/repos/asf/camel/blob/76659a97/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
index e2f0cb7..904951e 100644
--- a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
+++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/JettyContentExchange9.java
@@ -204,10 +204,9 @@ public class JettyContentExchange9 implements JettyContentExchange {
this.request.content(new InputStreamContentProvider(ins), this.requestContentType);
}
- public void setRequestContent(InputStream ins, int contentLength) {
- this.request.content(new CamelInputStreamContentProvider(ins, contentLength), this.requestContentType);
-
- }
+ public void setRequestContent(InputStream ins, int contentLength) {
+ this.request.content(new CamelInputStreamContentProvider(ins, contentLength), this.requestContentType);
+ }
public void addRequestHeader(String key, String s) {
this.request.header(key, s);