You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/29 12:18:00 UTC

[jira] [Commented] (MSHARED-749) Commandline does not thrown CommandLineException when uneven number of quotation marks used

    [ https://issues.apache.org/jira/browse/MSHARED-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561099#comment-16561099 ] 

ASF GitHub Bot commented on MSHARED-749:
----------------------------------------

KathrynN opened a new pull request #5: [MSHARED-749] - Commandline does not thrown CommandLineException when…
URL: https://github.com/apache/maven-shared-utils/pull/5
 
 
   … uneven number of quotation marks used

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Commandline does not thrown CommandLineException when uneven number of quotation marks used
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-749
>                 URL: https://issues.apache.org/jira/browse/MSHARED-749
>             Project: Maven Shared Components
>          Issue Type: Bug
>            Reporter: Kathryn Newbould
>            Priority: Major
>
> The merged fix for MSHARED-416 did not fully fix the issue as the process does not return non-0 on failure (which is what the tests were based on).
> As an example:
>  
> {code:java}
> @Test
> public void MSHARED_416 () throws Exception {
>     Process p = new Commandline("\"Hi\" Friends\"").execute();
>     Thread.sleep(1000);
>     assertNotEquals(0, p.exitValue());
> }
> {code}
> will fail without exception (e.g. return 0):
> {code:java}
> java.lang.AssertionError: Values should be different. Actual: 0
> {code}
> Even though the logs state (implying the Exception is being thrown)
> {code:java}
> Error translating Commandline.
> {code}
> Suggested fix:
>  
> As the Exception is thrown in the constructor, it can be difficult to catch it, so I suggest throwing it up to the process runner (executeCommandLineAsCallable) can handle it appropriately.
> However, I'm unsure of the implications.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)