camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/4] camel git commit: CAMEL-9564: EndpointHelper.resolveReferenceListParameter should not return immutable lists
Date Wed, 03 Feb 2016 07:56:13 GMT
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/b121af11
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b121af11
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b121af11

Branch: refs/heads/master
Commit: b121af11249cdd9c1f5c4e67a974fdc137daeaf1
Parents: 5b5411f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Feb 3 08:37:22 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Feb 3 08:37:22 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/b121af11/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) {


Mime
View raw message