karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [1/2] karaf git commit: [KARAF-4184] ArgumentCompleter has incorrect check for enum type
Date Tue, 15 Dec 2015 07:15:41 GMT
Repository: karaf
Updated Branches:
  refs/heads/master a443f520a -> de2a50cd0


[KARAF-4184] ArgumentCompleter has incorrect check for enum type


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

Branch: refs/heads/master
Commit: bba70a3e63211749e78a6c14940af6c58bc951ec
Parents: bf00362
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Sun Dec 13 14:50:14 2015 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Sun Dec 13 14:50:14 2015 +0100

----------------------------------------------------------------------
 .../apache/karaf/shell/impl/action/command/ArgumentCompleter.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/bba70a3e/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
index d87d0f9..adc554b 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
@@ -177,7 +177,7 @@ public class ArgumentCompleter implements Completer {
             completer = new FileCompleter();
         } else if (type.isAssignableFrom(Boolean.class) || type.isAssignableFrom(boolean.class))
{
             completer = new StringsCompleter(new String[] {"false", "true"}, false);
-        } else if (type.isAssignableFrom(Enum.class)) {
+        } else if (Enum.class.isAssignableFrom(type)) {
             Set<String> values = new HashSet<>();
             for (Object o : EnumSet.allOf((Class<Enum>) type)) {
                 values.add(o.toString());


Mime
View raw message