[ 
https://issues.apache.org/jira/browse/LUCENE-4352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe Schindler updated LUCENE-4352:
----------------------------------

    Attachment: LUCENE-4352.patch

Of course we can! Attached is new patch - using 
"(e.getClassName().startsWith("com.carrotsearch.ant.tasks.junit4."))". The 
important thing is that there is nothing between the last System.exit() or 
Runtime.exit() in the stack trace before the test runner package (as of above 
if statement), so its garanteed that the test runner itsself is calling exit() 
and not something deeper in the stack trace.

The loop in this code looks ugly but allows both patterns:
- test-runner calling System.exit() which itsself calls 
Runtime.getRuntime().exit()
- or test-runner clalling Runtime.exit() directly
                
> only the test runner should be able to System.exit
> --------------------------------------------------
>
>                 Key: LUCENE-4352
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4352
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-4352.patch, LUCENE-4352.patch
>
>
> All others should get SecurityException

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to