camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] camel git commit: Fixed bunch of CS errors for release
Date Wed, 10 Dec 2014 07:12:28 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x f0bfd0e1b -> 4feec4fb5
  refs/heads/master a42a65d90 -> 8f119e3fd


Fixed bunch of CS errors for release

Conflicts:
	camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlSplitBodyRouteTest.java


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

Branch: refs/heads/master
Commit: 443ebec920e4571d0262a61b12dbf7a8671e6b66
Parents: a42a65d
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed Dec 10 13:12:05 2014 +0800
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Dec 10 07:56:19 2014 +0100

----------------------------------------------------------------------
 .../properties/DefaultPropertiesParser.java     |  4 +--
 .../util/DumpModelAsXmlSplitBodyRouteTest.java  |  1 -
 .../camel/component/crypto/SignatureTests.java  |  9 ++++---
 .../camel/converter/jaxb/JaxbDataFormat.java    | 26 ++++++++++----------
 .../restlet/DefaultRestletBinding.java          |  6 ++---
 .../component/stream/ScanStreamDelayTest.java   |  2 +-
 6 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/443ebec9/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
index fdd2896..5b83983 100644
--- a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
+++ b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
@@ -221,8 +221,8 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper
                         log.debug("Property with key [{}] is applied by function [{}]", key,
function.getName());
                         String value = function.apply(remainder);
                         if (value == null) {
-                            throw new IllegalArgumentException("Property with key [" + key
+ "] using function [" + function.getName() + "]" +
-                                    " returned null value which is not allowed, from input:
" + input);
+                            throw new IllegalArgumentException("Property with key [" + key
+ "] using function [" + function.getName() + "]"
+                                    + " returned null value which is not allowed, from input:
" + input);
                         } else {
                             if (log.isDebugEnabled()) {
                                 log.debug("Property with key [{}] applied by function [{}]
-> {}", new Object[]{key, function.getName(), value});

http://git-wip-us.apache.org/repos/asf/camel/blob/443ebec9/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlSplitBodyRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlSplitBodyRouteTest.java
b/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlSplitBodyRouteTest.java
index df10d67..bfe2a2d 100644
--- a/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlSplitBodyRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlSplitBodyRouteTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.converter.jaxp.XmlConverter;
 import org.apache.camel.model.ModelHelper;
 
-
 /**
  *
  */

http://git-wip-us.apache.org/repos/asf/camel/blob/443ebec9/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
index 4d8148f..72cf658 100644
--- a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
+++ b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
@@ -140,7 +140,8 @@ public class SignatureTests extends CamelTestSupport {
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: keystore
-                from("direct:keystoreParameters").to("crypto:sign://keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob&password=letmein",
"crypto:verify://keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob", "mock:result");
+                from("direct:keystoreParameters").to("crypto:sign://keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob&password=letmein",
+                    "crypto:verify://keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob",
"mock:result");
                 // END SNIPPET: keystore
             }
         }, new RouteBuilder() {
@@ -198,14 +199,14 @@ public class SignatureTests extends CamelTestSupport {
         sendBody("direct:algorithm", payload);
         assertMockEndpointsSatisfied();
     }
-    
+
     @Test
     public void testRSASHA1() throws Exception {
         setupMock();
         sendBody("direct:rsa-sha1", payload);
         assertMockEndpointsSatisfied();
     }
-    
+
     @Test
     public void testRSASHA256() throws Exception {
         setupMock();
@@ -258,7 +259,7 @@ public class SignatureTests extends CamelTestSupport {
         sendBody("direct:keystoreParameters", payload);
         assertMockEndpointsSatisfied();
     }
-    
+
     @Test
     public void testSignatureHeaderInRouteDefinition() throws Exception {
         setupMock();

http://git-wip-us.apache.org/repos/asf/camel/blob/443ebec9/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
index 2993db5..68593eb 100644
--- a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
+++ b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
@@ -44,6 +44,7 @@ import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
+import org.xml.sax.SAXException;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
@@ -59,14 +60,13 @@ import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ResourceHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.xml.sax.SAXException;
 
 
 /**
  * A <a href="http://camel.apache.org/data-format.html">data format</a> ({@link
DataFormat})
  * using JAXB2 to marshal to and from XML
  *
- * @version 
+ * @version
  */
 public class JaxbDataFormat extends ServiceSupport implements DataFormat, CamelContextAware
{
 
@@ -80,7 +80,7 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
     private String contextPath;
     private String schema;
     private String schemaLocation;
-   
+
     private boolean prettyPrint = true;
     private boolean ignoreJAXBElement = true;
     private boolean mustBeJAXBElement = true;
@@ -113,10 +113,10 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
         try {
             // must create a new instance of marshaller as its not thread safe
             Marshaller marshaller = createMarshaller();
-            
+
             if (isPrettyPrint()) {
                 marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-            } 
+            }
             // exchange take precedence over encoding option
             String charset = exchange.getProperty(Exchange.CHARSET_NAME, String.class);
             if (charset == null) {
@@ -143,7 +143,7 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
     }
 
     void marshal(Exchange exchange, Object graph, OutputStream stream, Marshaller marshaller)
-            throws XMLStreamException, JAXBException, NoTypeConversionAvailableException,
IOException, InvalidPayloadException {
+        throws XMLStreamException, JAXBException, NoTypeConversionAvailableException, IOException,
InvalidPayloadException {
 
         Object e = graph;
         if (partialClass != null && getPartNamespace() != null) {
@@ -217,10 +217,10 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
 
     // Properties
     // -------------------------------------------------------------------------
-    public boolean isIgnoreJAXBElement() {        
+    public boolean isIgnoreJAXBElement() {
         return ignoreJAXBElement;
     }
-    
+
     public void setIgnoreJAXBElement(boolean flag) {
         ignoreJAXBElement = flag;
     }
@@ -275,11 +275,11 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
     public void setPrettyPrint(boolean prettyPrint) {
         this.prettyPrint = prettyPrint;
     }
-    
+
     public boolean isFragment() {
         return fragment;
     }
-    
+
     public void setFragment(boolean fragment) {
         this.fragment = fragment;
     }
@@ -347,7 +347,7 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
     public void setXmlStreamWriterWrapper(JaxbXmlStreamWriterWrapper xmlStreamWriterWrapper)
{
         this.xmlStreamWriterWrapper = xmlStreamWriterWrapper;
     }
-    
+
     public String getSchemaLocation() {
         return schemaLocation;
     }
@@ -406,7 +406,7 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
             return JAXBContext.newInstance();
         }
     }
-    
+
     protected Unmarshaller createUnmarshaller() throws JAXBException, SAXException, FileNotFoundException,
         MalformedURLException {
         Unmarshaller unmarshaller = getContext().createUnmarshaller();
@@ -439,7 +439,7 @@ public class JaxbDataFormat extends ServiceSupport implements DataFormat,
CamelC
 
         return marshaller;
     }
-    
+
     private Schema createSchema(Source[] sources) throws SAXException {
         SchemaFactory factory = getOrCreateSchemaFactory();
         try {

http://git-wip-us.apache.org/repos/asf/camel/blob/443ebec9/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 947d01c..dbc949d 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -177,7 +177,7 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
                     } else {
                         // put the user stuff in the form
                         if (value instanceof Collection) {
-                            for (Object v: (Collection<?>) value) {
+                            for (Object v : (Collection<?>) value) {
                                 form.add(key, v.toString());
                             }
                         } else {
@@ -336,8 +336,8 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
             if (mediaType != null && mediaType.equals(MediaType.APPLICATION_OCTET_STREAM))
{
                 exchange.getOut().setBody(response.getEntity().getStream());
             } else if (response.getEntity() instanceof Representation) {
-                Representation representationDecoded = new DecodeRepresentation(response.getEntity());

-                exchange.getOut().setBody(representationDecoded.getText());    
+                Representation representationDecoded = new DecodeRepresentation(response.getEntity());
+                exchange.getOut().setBody(representationDecoded.getText());
             } else {
                 // get content text by default
                 String text = response.getEntity().getText();

http://git-wip-us.apache.org/repos/asf/camel/blob/443ebec9/components/camel-stream/src/test/java/org/apache/camel/component/stream/ScanStreamDelayTest.java
----------------------------------------------------------------------
diff --git a/components/camel-stream/src/test/java/org/apache/camel/component/stream/ScanStreamDelayTest.java
b/components/camel-stream/src/test/java/org/apache/camel/component/stream/ScanStreamDelayTest.java
index 60ae0ab..b790e37 100644
--- a/components/camel-stream/src/test/java/org/apache/camel/component/stream/ScanStreamDelayTest.java
+++ b/components/camel-stream/src/test/java/org/apache/camel/component/stream/ScanStreamDelayTest.java
@@ -28,7 +28,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
- * 
+ *
  */
 public class ScanStreamDelayTest extends CamelTestSupport {
 


Mime
View raw message