RFR (S) 8049300: jjs scripting: need way to quote $EXEC command arguments to protect spaces

A. Sundararajan sundararajan.athijegannathan at oracle.com
Fri May 15 13:54:08 UTC 2015

* javadoc comment for tokenizeCommandLine misses @throws IOException

* In nashorn project, parameters and locals (when possible) are 
explicitly declared "final" (project specific code convention). 
tokenizeCommandLine param and locals can be "final".

* Because there is no regression test, please add noreg-hard or 
appropriate label to the bug report.



On Friday 15 May 2015 07:12 PM, Michael Haupt wrote:
> Dear all,
> please review and sponsor this change.
> Webrev: http://cr.openjdk.java.net/~mhaupt/8049300/webrev.00
> RFE: https://bugs.openjdk.java.net/browse/JDK-8049300
> There are several ways in which paths can contain spaces (quoting with "" or '', or escaping). The implementation of the $EXEC command would tokenise using a plain StringTokenizer, which splits a string at space characters regardless of quoting. The new implementation employs a StreamTokenizer and some extra logic to handle escaped spaces.
> Thanks,
> Michael

More information about the nashorn-dev mailing list