camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-9434: camel-catalog - did you mean
Date Thu, 31 Dec 2015 10:34:11 GMT
CAMEL-9434: camel-catalog - did you mean


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

Branch: refs/heads/camel-2.16.x
Commit: faf4394d5032042810dcbf1e070a27e9f0a46ded
Parents: 05c1cc7
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Dec 31 11:27:45 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Dec 31 11:34:00 2015 +0100

----------------------------------------------------------------------
 .../org/apache/camel/catalog/EndpointValidationResult.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/faf4394d/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
b/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
index dcc9c57..54c8b6a 100644
--- a/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
+++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/EndpointValidationResult.java
@@ -241,8 +241,12 @@ public class EndpointValidationResult implements Serializable {
             for (String name : unknown) {
                 if (unknownSuggestions != null && unknownSuggestions.containsKey(name))
{
                     String[] suggestions = unknownSuggestions.get(name);
-                    String str = Arrays.asList(suggestions).toString();
-                    options.put(name, "Unknown option. Did you mean: " + str);
+                    if (suggestions != null && suggestions.length > 0) {
+                        String str = Arrays.asList(suggestions).toString();
+                        options.put(name, "Unknown option. Did you mean: " + str);
+                    } else {
+                        options.put(name, "Unknown option");
+                    }
                 } else {
                     options.put(name, "Unknown option");
                 }


Mime
View raw message