RFC - Reduce loading of PropertiesFile

Jiri Vanek jvanek at redhat.com
Wed Apr 25 05:07:09 PDT 2012


On 04/20/2012 03:01 PM, Thomas Meyer wrote:
>
> Zitat von Jiri Vanek <jvanek at redhat.com>:
>
>> On 04/19/2012 09:14 PM, Thomas Meyer wrote:
>>
>>>
>>> patch1.diff
>>>
>>>
>>> # HG changeset patch
>>> # User Thomas Meyer<thomas at m3y3r.de>
>>> # Date 1334859522 -7200
>>> # Node ID e750944c8d66bbab0801e7490303eef26b689df3
>>> # Parent 4a35862de3fc26a9e1cdfb66fd7b6c750f18371b
>>> Enable JNLPRuntime class to run in headless mode
>>>
>>> diff -r 4a35862de3fc -r e750944c8d66 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
>>> --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Apr 19 20:02:40 2012 +0200
>>> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Apr 19 20:18:42 2012 +0200
>>> @@ -199,12 +199,14 @@
>>> ServiceManager.setServiceManagerStub(new XServiceManagerStub()); // ignored if we're running
>>> under Web Start
>>>
>>> policy = new JNLPPolicy();
>>> - security = new JNLPSecurityManager(); // side effect: create JWindow
>>> -
>>> - try {
>>> - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
>>> - } catch (Exception e) {
>>> - // ignore it
>>> + if (!headless) {
>>> + security = new JNLPSecurityManager(); // side effect: create JWindow
>>> +
>>> + try {
>>> + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
>>> + } catch (Exception e) {
>>> + // ignore it
>>> + }
>>> }
>>>
>>> doMainAppContextHacks();
>>>
>>>
>> hmhm. This looks un-relevant to original issue. What is motivation? Can you poist it in new patch?
>
> without this path the unit test fails in/after a call to JNLPRuntime.initialize() with a
> StackOverflowException.
>
> my solution was to disable the SecurityManager for headless mode. this made my unit test work.
> I'm not sure if this is the correct thing to do here! Help appriciated!
>

It is definitely wrong. We must have security manager in all times!

Correct think will be to set proper permissions and so allow start of security threads correctly 
(just guessing, right now digging deeper;)

J.



More information about the distro-pkg-dev mailing list