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 2020/03/04 13:09:46 UTC

[camel] branch master updated: Camel-core-engine: Fixed CS

This is an automated email from the ASF dual-hosted git repository.

acosentino 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 c5d4b22  Camel-core-engine: Fixed CS
c5d4b22 is described below

commit c5d4b22a6bbdf2053dc514ff6882d1574e33fbef
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 4 14:09:21 2020 +0100

    Camel-core-engine: Fixed CS
---
 .../java/org/apache/camel/reifier/RouteReifier.java  | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/reifier/RouteReifier.java b/core/camel-core-engine/src/main/java/org/apache/camel/reifier/RouteReifier.java
index 7f3b270..3936aea 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/reifier/RouteReifier.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/reifier/RouteReifier.java
@@ -55,6 +55,15 @@ import org.apache.camel.util.ObjectHelper;
 
 public class RouteReifier extends ProcessorReifier<RouteDefinition> {
 
+    private static final String[] RESERVED_PROPERTIES = new String[] {
+    Route.ID_PROPERTY, Route.CUSTOM_ID_PROPERTY, Route.PARENT_PROPERTY,
+    Route.DESCRIPTION_PROPERTY, Route.GROUP_PROPERTY,
+    Route.REST_PROPERTY};
+
+    public RouteReifier(CamelContext camelContext, ProcessorDefinition<?> definition) {
+        super(camelContext, (RouteDefinition) definition);
+    }
+
     /**
      * Advices this route with the route builder.
      * <p/>
@@ -98,15 +107,6 @@ public class RouteReifier extends ProcessorReifier<RouteDefinition> {
         return new RouteReifier(camelContext, definition).adviceWith(builder);
     }
 
-    private static final String[] reservedProperties = new String[] {
-            Route.ID_PROPERTY, Route.CUSTOM_ID_PROPERTY, Route.PARENT_PROPERTY,
-            Route.DESCRIPTION_PROPERTY, Route.GROUP_PROPERTY,
-            Route.REST_PROPERTY};
-
-    public RouteReifier(CamelContext camelContext, ProcessorDefinition<?> definition) {
-        super(camelContext, (RouteDefinition) definition);
-    }
-
     @Override
     public Processor createProcessor() throws Exception {
         throw new UnsupportedOperationException("Not implemented for RouteDefinition");
@@ -517,7 +517,7 @@ public class RouteReifier extends ProcessorReifier<RouteDefinition> {
                 try {
                     final String key = parseString(prop.getKey());
                     final String val = parseString(prop.getValue());
-                    for (String property : reservedProperties) {
+                    for (String property : RESERVED_PROPERTIES) {
                         if (property.equalsIgnoreCase(key)) {
                             throw new IllegalArgumentException("Cannot set route property " + property + " as it is a reserved property");
                         }