You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/03/18 02:53:26 UTC
[1/3] camel git commit: Fixed the CS errors of camel-core
Repository: camel
Updated Branches:
refs/heads/master 3bcc9d482 -> 1deebcc9c
Fixed the CS errors of camel-core
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1deebcc9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1deebcc9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1deebcc9
Branch: refs/heads/master
Commit: 1deebcc9cdf5082269e33bbf0e95f1ac3ef535d4
Parents: 94cb100
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 09:52:47 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 09:53:00 2015 +0800
----------------------------------------------------------------------
.../main/java/org/apache/camel/builder/DataFormatClause.java | 3 ++-
.../src/main/java/org/apache/camel/model/ChoiceDefinition.java | 3 ++-
.../java/org/apache/camel/processor/DeferServiceFactory.java | 6 +++++-
.../camel/component/bean/issues/SingleMethodService.java | 3 +--
4 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1deebcc9/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
index 48757d1..c0857a9 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
@@ -19,9 +19,9 @@ package org.apache.camel.builder;
import java.util.Map;
import java.util.zip.Deflater;
-import org.apache.camel.model.dataformat.BoonDataFormat;
import org.w3c.dom.Node;
+
import org.apache.camel.model.DataFormatDefinition;
import org.apache.camel.model.ProcessorDefinition;
import org.apache.camel.model.dataformat.AvroDataFormat;
@@ -29,6 +29,7 @@ import org.apache.camel.model.dataformat.Base64DataFormat;
import org.apache.camel.model.dataformat.BeanioDataFormat;
import org.apache.camel.model.dataformat.BindyDataFormat;
import org.apache.camel.model.dataformat.BindyType;
+import org.apache.camel.model.dataformat.BoonDataFormat;
import org.apache.camel.model.dataformat.CastorDataFormat;
import org.apache.camel.model.dataformat.CsvDataFormat;
import org.apache.camel.model.dataformat.CustomDataFormat;
http://git-wip-us.apache.org/repos/asf/camel/blob/1deebcc9/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java b/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java
index a27502b..e33e460 100644
--- a/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java
@@ -147,7 +147,8 @@ public class ChoiceDefinition extends ProcessorDefinition<ChoiceDefinition> {
// okay we are adding a when or otherwise so allow any kind of output after this again
onlyWhenOrOtherwise = false;
} else {
- throw new IllegalArgumentException("A new choice clause should start with a when() or otherwise(). If you intend to end the entire choice and are using endChoice() then use end() instead.");
+ throw new IllegalArgumentException("A new choice clause should start with a when() or otherwise(). "
+ + "If you intend to end the entire choice and are using endChoice() then use end() instead.");
}
}
super.addOutput(output);
http://git-wip-us.apache.org/repos/asf/camel/blob/1deebcc9/camel-core/src/main/java/org/apache/camel/processor/DeferServiceFactory.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/DeferServiceFactory.java b/camel-core/src/main/java/org/apache/camel/processor/DeferServiceFactory.java
index b008ec7..26602ca 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DeferServiceFactory.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DeferServiceFactory.java
@@ -24,7 +24,11 @@ import org.apache.camel.impl.DeferProducer;
* Factory to create services such as {@link Producer}s
* and defer starting the created service, until {@link org.apache.camel.CamelContext} has been started.
*/
-public class DeferServiceFactory {
+public final class DeferServiceFactory {
+
+ private DeferServiceFactory() {
+ // It's a helper class
+ }
/**
* Creates the {@link Producer} which is deferred started until {@link org.apache.camel.CamelContext} is being started.
http://git-wip-us.apache.org/repos/asf/camel/blob/1deebcc9/camel-core/src/test/java/org/apache/camel/component/bean/issues/SingleMethodService.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/issues/SingleMethodService.java b/camel-core/src/test/java/org/apache/camel/component/bean/issues/SingleMethodService.java
index f3fe2e0..2b3ed07 100644
--- a/camel-core/src/test/java/org/apache/camel/component/bean/issues/SingleMethodService.java
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/issues/SingleMethodService.java
@@ -17,6 +17,5 @@
package org.apache.camel.component.bean.issues;
public interface SingleMethodService<S, T> {
-
- public T doSomething(S foo);
+ T doSomething(S foo);
}
[2/3] camel git commit: Added an unit test to show how to set the +
to the exec args option
Posted by ni...@apache.org.
Added an unit test to show how to set the + to the exec args option
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/94cb100f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/94cb100f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/94cb100f
Branch: refs/heads/master
Commit: 94cb100faa1e5d57f614f89b1384bedc7d29aab1
Parents: e7fde37
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 09:52:19 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 09:53:00 2015 +0800
----------------------------------------------------------------------
.../apache/camel/component/exec/ExecEndpointTest.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/94cb100f/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
index ebd4cfc..5a8f380 100644
--- a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
+++ b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
@@ -106,7 +106,7 @@ public class ExecEndpointTest extends AbstractJUnit4SpringContextTests {
ExecEndpoint e = createExecEndpoint("exec:test?args=" + args.replaceAll(" ", "+"));
assertEquals(args, e.getArgs());
}
-
+
@Test
@DirtiesContext
public void testCreateEndpointWithArgs2() throws Exception {
@@ -114,6 +114,15 @@ public class ExecEndpointTest extends AbstractJUnit4SpringContextTests {
ExecEndpoint e = createExecEndpoint("exec:test?args=" + UnsafeUriCharactersEncoder.encode(args));
assertEquals(args, e.getArgs());
}
+
+ @Test
+ @DirtiesContext
+ public void testCreateEndpointWithArgs3() throws Exception {
+ String args = "RAW(arg1+arg2 arg3)";
+ // Just avoid URI encoding by using the RAW()
+ ExecEndpoint e = createExecEndpoint("exec:test?args=" + args);
+ assertEquals("arg1+arg2 arg3", e.getArgs());
+ }
@Test
@DirtiesContext
[3/3] camel git commit: Fixed the CS error of camel-sjms
Posted by ni...@apache.org.
Fixed the CS error of camel-sjms
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e7fde373
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e7fde373
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e7fde373
Branch: refs/heads/master
Commit: e7fde3731fef4c840d2659210e292d3b365bc7a6
Parents: 3bcc9d4
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 09:49:57 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 09:53:00 2015 +0800
----------------------------------------------------------------------
.../java/org/apache/camel/component/sjms/jms/JmsMessageHelper.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/e7fde373/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsMessageHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsMessageHelper.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsMessageHelper.java
index f065bbe..dcccd9b 100644
--- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsMessageHelper.java
+++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsMessageHelper.java
@@ -204,6 +204,7 @@ public final class JmsMessageHelper implements JmsConstants {
} else {
throw new JMSException("Null body is not allowed");
}
+ break;
default:
break;
}