ASF Bugzilla – Attachment 8829 Details for
Bug 24231
command-line option to signify no more options
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to implement empty option as -.
Main.diffs (text/plain), 1.37 KB, created by
Matt Benson
on 2003-10-30 16:23:15 UTC
(
hide
)
Description:
Patch to implement empty option as -.
Filename:
MIME Type:
Creator:
Matt Benson
Created:
2003-10-30 16:23:15 UTC
Size:
1.37 KB
patch
obsolete
>--- /cygdrive/d/TEMP/Main.java 2003-10-30 09:57:46.000000000 -0600 >+++ src/main/org/apache/tools/ant/Main.java 2003-10-30 10:09:54.000000000 -0600 >@@ -423,7 +423,7 @@ > projectHelp = true; > } else if (arg.equals("-find") || arg.equals("-s")) { > // eat up next arg if present, default to build.xml >- if (i < args.length - 1) { >+ if (i < args.length - 1 && !(args[i + 1].equals("-."))) { > searchForThis = args[++i]; > } else { > searchForThis = DEFAULT_BUILD_FILENAME; >@@ -456,6 +456,7 @@ > throw new BuildException( > "Niceness value is out of the range 1-10"); > } >+ } else if (arg.equals("-.")) {//do nothing > } else if (arg.startsWith("-")) { > // we don't have any more args to recognize! > String msg = "Unknown argument: " + arg; >@@ -864,6 +865,7 @@ > msg.append(" -s <file> the filesystem and use it" + lSep); > msg.append(" -nice number A niceness value for the main thread:" + lSep + > " 1 (lowest) to 10 (highest); 5 is the default" + lSep); >+ msg.append(" -. signify end of options" + lSep); > System.out.println(msg.toString()); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24231
: 8829 |
9111