You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/02/03 08:56:15 UTC

[4/4] camel git commit: CAMEL-9564: EndpointHelper.resolveReferenceListParameter should not return immutable lists

CAMEL-9564: EndpointHelper.resolveReferenceListParameter should not return immutable lists


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d155bc50
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d155bc50
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d155bc50

Branch: refs/heads/camel-2.16.x
Commit: d155bc500b2ed8b7a86e7a82f6be6d0bc38c651a
Parents: 2dd718d
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Feb 3 08:37:22 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Feb 3 08:55:59 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/util/EndpointHelper.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d155bc50/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java b/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java
index 93c2be2..eeb75ca 100644
--- a/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java
@@ -341,13 +341,13 @@ public final class EndpointHelper {
      * @param context     Camel context to use for lookup.
      * @param value       reference parameter value.
      * @param elementType result list element type.
-     * @return list of lookup results.
+     * @return list of lookup results, will always return a list.
      * @throws IllegalArgumentException if any referenced object was not found in registry.
      */
     @SuppressWarnings({"unchecked", "rawtypes"})
     public static <T> List<T> resolveReferenceListParameter(CamelContext context, String value, Class<T> elementType) {
         if (value == null) {
-            return Collections.emptyList();
+            return new ArrayList<T>();
         }
         List<String> elements = Arrays.asList(value.split(","));
         if (elements.size() == 1) {