[
http://jira.qos.ch/browse/LBCORE-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12346#action_12346
]
Glyn Normington commented on LBCORE-244:
----------------------------------------
I have provided a fix and a test in [1] and issued a pull request to [2]. I
have verified the fix works under Virgo ([3]).
The fix is along the lines recommended by Arno Unkrig in the referenced thread,
but I am a little concerned that Janino is not thread safe when used in this
way. I have raised this concern on the janino-user mailing list ([4]). However,
this is a Janino issue. The only relevance is that the proposed fix to this
issue potentially exposes logback to the thread safety issue. So it may be
worth deferring pulling this fix in until we are sure Janino is suitably thread
safe.
As for the test, it could be made more compact with the use of a suitable
mocking library, but I wasn't sure which one to choose, so I did without. Also,
it avoids creating a custom class loader to test that Janino's "parent" class
loader has been correctly set. It does this by reflectively accessing a private
field from Janino. Clearly this test is likely to break if Janino changes that
field, but at least the current test is small and easily understood.
[1]
https://github.com/glyn/logback/commit/deee1536d3ea65be3dfe0f9123d3b87af8b6e31c
[2] https://github.com/ceki/logback
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=333920#c16
[4] http://old.nabble.com/Re%3A-Janino-and-OSGi--p33128536.html
> JaninoEventEvaluator causes Janino to use the TCCL
> --------------------------------------------------
>
> Key: LBCORE-244
> URL: http://jira.qos.ch/browse/LBCORE-244
> Project: logback-core
> Issue Type: Bug
> Affects Versions: 0.9.28, 0.9.29, 0.9.30, 1.0.0
> Reporter: Glyn Normington
> Assignee: Logback dev list
>
> This is a regression compared to 0.9.24 which correctly specified logback's
> class loader as Janino's "parent" class loader.
> Details: http://mailman.qos.ch/pipermail/logback-user/2012-January/002917.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev