lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4352) only the test runner should be able to System.exit
Date Mon, 03 Sep 2012 18:25:07 GMT


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:
>             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:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message