This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
protected int cli(CLIHandler.Args args) {
String[] argv = args.getArguments();
File curDir = args.getCurrentDirectory ();
int nonNullIndex = -1;
for (int i = 0; i < argv.length; i++) {
if (argv[i] == null) {
continue;
}
if (nonNullIndex == -1) {
nonNullIndex = i;
} else {
nonNullIndex = -2;
/* No -open <filename> or --open <filename> arguments found. */
if (nonNullIndex >= 0) { //exactly one non-null argument found
String arg = argv[nonNullIndex];
assert arg != null;
if (!arg.startsWith("-")) { //NOI18N
return openFile (curDir, args, argv, nonNullIndex);
// No problems.
return 0;