Permalink
Browse files

fix type conversion and index errors

  • Loading branch information...
jeffbrown committed May 4, 2012
1 parent 8651c1c commit 32d9af28d8efdb83cfb405f58e13513c3c70e182
Showing with 3 additions and 2 deletions.
  1. +3 −2 grails-wrapper/src/main/java/org/grails/wrapper/GrailsWrapper.java
@@ -49,20 +49,21 @@ public static void main(final String[] args) throws Exception{
final List<String> newArgsList = new ArrayList<String>();
for(int i = 0; i < args.length; i++) {
- final String arg = args[0];
+ final String arg = args[i];
if("--main".equals(arg) && i < args.length - 1) {
// skip --main and the following argument
i++;
} else if("--conf".equals(arg) && i < args.length - 1) {
newArgsList.add(arg);
final File groovyStarterConf = new File(grailsHome, "conf/groovy-starter.conf");
newArgsList.add(groovyStarterConf.getAbsolutePath());
+ i++;
} else {
newArgsList.add(arg);
}
}
- final Object[] newArgsArray = newArgsList.toArray();
+ final String[] newArgsArray = newArgsList.toArray(new String[0]);
final URL[] urls = new URL[2];
urls[0] = new File(grailsHome, "dist/grails-bootstrap-" + grailsVersion + ".jar").toURI().toURL();
File[] groovyJarCandidates = new File(grailsHome, "lib/org.codehaus.groovy/groovy-all/jars/").listFiles(new FilenameFilter() {

0 comments on commit 32d9af2

Please sign in to comment.