harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4484) [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Date Mon, 23 Jul 2007 12:43:31 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514614
] 

Gregory Shimansky commented on HARMONY-4484:
--------------------------------------------

This patch doesn't work on Linux. When you add quotes around classpath, it doesn't help because
command line is broken into separate pieces with default StringTokenizer that doesn't care
about quotes, so it breaks classpath argument if it contains spaces into separate arguments.

The reason why the patch works on windows is that Runtime.exec on windows builds command line
back into single command line string, so quotes that it contains help to protect one argument
from being split again by windows exec code. This doesn't work on linux because separate arguments
split by StringTokenizer in Runtime.exec are not glued back together into one command line
for execve or execvp.

The approach to build command line for Runtime.exec in JDWPUnitDebuggeeWrapper should be different.
It should build a command line array with each argument a separate String. In this cause no
automatic splitting will be done in Runtime.exec.

> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4484
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4484
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>         Environment: Revision: 556026
>            Reporter: Andrey Yakushev
>            Assignee: Gregory Shimansky
>         Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message