fix FELIX-1408
don't expand array args when coercing.
current expansion is wrong and agreed solution was to remove expansion completely.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@804668 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Reflective.java b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Reflective.java
index eeab41a..994d0e9 100644
--- a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Reflective.java
+++ b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/shell/Reflective.java
@@ -187,20 +187,6 @@
// No match, check for varargs
if (types[i].isArray() && i == types.length - 1)
{
-
- // derek - expand final array arg
- if (i < in.size())
- {
- Object arg = in.get(i);
- if (arg instanceof List)
- {
- List<Object> args = (List<Object>) arg;
- in = new ArrayList<Object>(in);
- in.remove(i);
- in.addAll(args);
- }
- }
-
// Try to parse the remaining arguments in an array
Class<?> component = types[i].getComponentType();
Object components = Array.newInstance(component, in.size() - i);