Please take a look at:
http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html
So this code is going to work with java but not in beanshell.
public class foo {
public static void bar(String... a){
print(a.length);
}
}
// Error: Parser Error: Parse error at line 5, column 32. Encountered: .
bsh % // Error: Parser Error: Parse error at line 1, column 3. Encountered: )
bsh % // Error: EvalError: Class or variable not found: a.length : at Line: 2 : in file: <unknown file> : a .length
bsh % // Error: Parser Error: Parse error at line 4, column 1. Encountered: }
This is a feature from java itself many people are waiting for, please support this in beanshell too.
Thanks
Chris
Logged In: YES
user_id=52599
Originator: NO
+1!
Ticket has been migrated to github.
Please follow up on this over here: https://github.com/beanshell/beanshell/issues/105