This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new cf971fe Fix RestDefinition#bindingMode(xx) methods
cf971fe is described below
commit cf971fe3b62f2688bfeb1424c7cc0ed8c417e68b
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed Apr 1 11:31:38 2020 +0200
Fix RestDefinition#bindingMode(xx) methods
---
.../java/org/apache/camel/model/rest/RestDefinition.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/core/camel-core-engine/src/main/java/org/apache/camel/model/rest/RestDefinition.java
b/core/camel-core-engine/src/main/java/org/apache/camel/model/rest/RestDefinition.java
index 1ff251f..d632578 100644
---
a/core/camel-core-engine/src/main/java/org/apache/camel/model/rest/RestDefinition.java
+++
b/core/camel-core-engine/src/main/java/org/apache/camel/model/rest/RestDefinition.java
@@ -476,21 +476,21 @@ public class RestDefinition extends
OptionalIdentifiedDefinition<RestDefinition>
}
public RestDefinition bindingMode(RestBindingMode mode) {
+ return bindingMode(mode.name());
+ }
+
+ public RestDefinition bindingMode(String mode) {
if (getVerbs().isEmpty()) {
- this.bindingMode = mode.name();
+ this.bindingMode = mode.toLowerCase();
} else {
// add on last verb as that is how the Java DSL works
VerbDefinition verb = getVerbs().get(getVerbs().size() - 1);
- verb.setBindingMode(mode.name());
+ verb.setBindingMode(mode.toLowerCase());
}
return this;
}
- public RestDefinition bindingMode(String mode) {
- return bindingMode(mode.toLowerCase());
- }
-
public RestDefinition skipBindingOnErrorCode(boolean
skipBindingOnErrorCode) {
if (getVerbs().isEmpty()) {
this.skipBindingOnErrorCode =
Boolean.toString(skipBindingOnErrorCode);