RFR: 8077822: javac does not recognize '*.java' as file if '-J' option is specified (original) (raw)
Rob McKenna rob.mckenna at oracle.com
Tue May 19 18:38:25 UTC 2015
- Previous message: RFR: 8077822: javac does not recognize '*.java' as file if '-J' option is specified
- Next message: RFR: 8080608: Missing archive name from jdeps -v -e output if no dependency on other JAR
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks Kumar, I'll alter (& build / test) it before pushing.
-Rob
On 19/05/15 19:22, Kumar Srinivasan wrote:
Hi Rob,
Looks good, except a small nit, I would've written this with a positive check + /* Copy the non-vm args */ + for (i = 0; i < nargc ; i++) { + const char *arg = stdargs[i].arg; + if (arg[0] != '-' || arg[1] != 'J') { + argv = (StdArg*) JLIMemRealloc(argv, (nargs+1) * sizeof(StdArg)); + argv[nargs].arg = JLIStringDup(arg); + argv[nargs].haswildcard = stdargs[i].haswildcard; + nargs++; + } + }
as follows..... /* Copy the non-vm args */ for (i = 0; i < nargc ; i++) { const char *arg = stdargs[i].arg; if (arg[0] == '-' && arg[1] == 'J') // OR if (JLIStrNCmp(arg, "-J", JLIStrLen("-J") == 0) continue; argv = (StdArg*) JLIMemRealloc(argv, (nargs+1) * sizeof(StdArg)); argv[nargs].arg = JLIStringDup(arg); argv[nargs].haswildcard = stdargs[i].haswildcard; nargs++; } Thanks Kumar On 5/19/2015 6:58 AM, Rob McKenna wrote: Hi folks,
Because of platform specifics the Java launcher contains some extra wildcard expansion processing on Windows. As part of this processing the list of args received by CreateApplicationArgs (javamd.c) is compared to the original list in the java launchers main method. Unfortunately the CreateApplicationArgs list has already been filtered by TranslateApplicationArgs which removes VM specific flags. This results in the launcher incorrectly neglecting to expand wildcard arguments. This fix filters the main method args in the same way so CreateApplicationArgs will be comparing like with like. http://cr.openjdk.java.net/~robm/8077822/webrev.01/ -Rob
- Previous message: RFR: 8077822: javac does not recognize '*.java' as file if '-J' option is specified
- Next message: RFR: 8080608: Missing archive name from jdeps -v -e output if no dependency on other JAR
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]