Author: ecn Date: Tue Mar 26 18:06:09 2013 New Revision: 1461247 URL: http://svn.apache.org/r1461247 Log: ACCUMULO-581 make ShellServerTest portable to hadoop2.0
Modified: accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java Modified: accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java?rev=1461247&r1=1461246&r2=1461247&view=diff ============================================================================== --- accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java (original) +++ accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java Tue Mar 26 18:06:09 2013 @@ -165,12 +165,13 @@ public class ShellServerTest { Constructor<DistCp>[] constructors = (Constructor<DistCp>[]) DistCp.class.getConstructors(); for (Constructor<DistCp> constructor : constructors) { Class<?>[] parameterTypes = constructor.getParameterTypes(); - if (parameterTypes.length > 1 && parameterTypes[0].equals(Configuration.class)) + if (parameterTypes.length > 0 && parameterTypes[0].equals(Configuration.class)) { if (parameterTypes.length == 1) { return constructor.newInstance(new Configuration()); } else if (parameterTypes.length == 2) { return constructor.newInstance(new Configuration(), null); } + } } } catch (Exception e) { throw new RuntimeException(e);