This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new ed138f7 Polished
ed138f7 is described below
commit ed138f782ab4ac68ffb987280791b99abbe37009
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Feb 3 11:16:05 2022 +0100
Polished
---
.../groovy/org/apache/camel/dsl/groovy/common/GroovyDSL.groovy | 1 -
.../camel/dsl/groovy/common/model/BeanConfiguration.groovy | 3 +--
.../dsl/groovy/common/model/DataFormatsConfiguration.groovy | 2 +-
.../camel/dsl/groovy/common/model/LanguagesConfiguration.groovy | 9 ++++-----
.../services/org.codehaus.groovy.runtime.ExtensionModule | 2 +-
5 files changed, 7 insertions(+), 10 deletions(-)
diff --git
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/GroovyDSL.groovy
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/GroovyDSL.groovy
index 9b7b9b0..2258c5e 100644
---
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/GroovyDSL.groovy
+++
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/GroovyDSL.groovy
@@ -38,7 +38,6 @@ import org.apache.camel.model.RouteDefinition
import org.apache.camel.model.rest.RestConfigurationDefinition
import org.apache.camel.model.rest.RestDefinition
import org.apache.camel.spi.Registry
-import org.apache.camel.support.builder.ExpressionBuilder
class GroovyDSL extends BuilderSupport implements EndpointBuilderFactory {
final Registry registry
diff --git
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/BeanConfiguration.groovy
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/BeanConfiguration.groovy
index 018e9c9..666c172 100644
---
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/BeanConfiguration.groovy
+++
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/BeanConfiguration.groovy
@@ -30,7 +30,7 @@ class BeanConfiguration {
}
def methodMissing(String name, arguments) {
- Object value = null
+ Object value
final Object[] args = arguments as Object[]
if (args == null) {
@@ -45,7 +45,6 @@ class BeanConfiguration {
def m = this.target.metaClass.getMetaMethod(name, Closure.class)
if (m) {
m.invoke(target, args)
-
// done
return
}
diff --git
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/DataFormatsConfiguration.groovy
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/DataFormatsConfiguration.groovy
index 9c68712..c62455b 100644
---
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/DataFormatsConfiguration.groovy
+++
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/DataFormatsConfiguration.groovy
@@ -32,7 +32,7 @@ class DataFormatsConfiguration {
throw new IllegalArgumentException("Unable to find a dataformat
with name: ${name}")
}
- // Just make sure the closure context is belong to component
+ // Just make sure the closure context is belong to dataformat
callable.resolveStrategy = Closure.DELEGATE_ONLY
callable.delegate = new BeanConfiguration(context, target)
callable.call()
diff --git
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/LanguagesConfiguration.groovy
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/LanguagesConfiguration.groovy
index ce23df9..0dcd7cb 100644
---
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/LanguagesConfiguration.groovy
+++
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/groovy/org/apache/camel/dsl/groovy/common/model/LanguagesConfiguration.groovy
@@ -32,12 +32,12 @@ class LanguagesConfiguration {
throw new IllegalArgumentException("Unable to find a language with
name: ${name}")
}
- // Just make sure the closure context is belong to component
+ // Just make sure the closure context is belong to language
callable.resolveStrategy = Closure.DELEGATE_ONLY
callable.delegate = new BeanConfiguration(context, target)
callable.call()
- // let's the camel context be aware of the new dataformat
+ // let's the camel context be aware of the new language
context.registry.bind(name, Language.class, target)
}
@@ -50,17 +50,16 @@ class LanguagesConfiguration {
// multiple instances of the same language but with different setup
if (target == null) {
target = context.injector.newInstance(type)
-
bind = true
}
- // Just make sure the closure context is belong to dataformat
+ // Just make sure the closure context is belong to language
callable.resolveStrategy = Closure.DELEGATE_ONLY
callable.delegate = new BeanConfiguration(context, target)
callable.call()
if (bind) {
- // let's the camel context be aware of the new dataformat
+ // let's the camel context be aware of the new language
context.registry.bind(name, type, target)
}
}
diff --git
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
index f55cd66..c7e1bcd 100644
---
a/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
+++
b/dsl/camel-groovy-dsl/camel-groovy-dsl-common/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
@@ -15,7 +15,7 @@
# limitations under the License.
#
-moduleName=camel-k-loader-groovy
+moduleName=camel-groovy-dsl
moduleVersion=1.0.0
extensionClasses=\
org.apache.camel.dsl.groovy.common.extensions.ExpressionClauseExtensions,\