You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/10/02 15:29:30 UTC

[camel] 02/02: chore(main): make utility methods protected so they can be used by classes extending MainSupport

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

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 46282abf72112c268727a96d7b5d6b48f0eba6ae
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Wed Oct 2 15:01:42 2019 +0200

    chore(main): make utility methods protected so they can be used by classes extending MainSupport
---
 .../src/main/java/org/apache/camel/main/MainSupport.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
index e8289b1..c98ccff 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
@@ -1252,13 +1252,6 @@ public abstract class MainSupport extends ServiceSupport {
         }
     }
 
-    private static String optionKey(String key) {
-        // as we ignore case for property names we should use keys in same case and without dashes
-        key = StringHelper.replaceAll(key, "-", "");
-        key = key.toLowerCase(Locale.US);
-        return key;
-    }
-
     public void addRouteBuilder(RouteBuilder routeBuilder) {
         getRouteBuilders().add(routeBuilder);
     }
@@ -1279,7 +1272,14 @@ public abstract class MainSupport extends ServiceSupport {
         setRouteBuilderClasses(existing);
     }
 
-    private static boolean setPropertiesOnTarget(CamelContext context, Object target, Map<String, Object> properties,
+    protected static String optionKey(String key) {
+        // as we ignore case for property names we should use keys in same case and without dashes
+        key = StringHelper.replaceAll(key, "-", "");
+        key = key.toLowerCase(Locale.US);
+        return key;
+    }
+
+    protected static boolean setPropertiesOnTarget(CamelContext context, Object target, Map<String, Object> properties,
                                                  String optionKey, String optionPrefix, boolean failIfNotSet, boolean ignoreCase,
                                                  Map<String, String> autoConfiguredProperties) throws Exception {
         ObjectHelper.notNull(context, "context");