Re: 8152515: (logging) LogManager.resetLogger should ignore LinkageError

2016-10-28 Thread Jonathan Bluett-Duncan
Oh, I see! Thanks for pointing out my misconception for me. :)

In that case, this fix looks fine to me as a non-reviewer.

Kind regards,
Jonathan

On 28 October 2016 at 17:15, Roger Riggs  wrote:

> Hi Jonathan,
>
> There is no issue in this case.
> LinkageError does not extend Exception so they are disjoint at the catch
> clauses.
> And the compiler produces an error if a catch clause hides another
> exception to keep
> the mistake from being hidden.
>
> $.02, Roger
>
>
>
> On 10/28/2016 12:00 PM, Jonathan Bluett-Duncan wrote:
>
>> I've an awful suspicion that the `catch (LinkageError e)` block is
>> unreachable, as the `catch (Exception e)` block would run first, being
>> located above the other block in the source code.
>>
>> Is my suspicion correct?
>>
>> Kind regards,
>> Jonathan
>>
>> On 28 October 2016 at 16:36, Jason Mehrens 
>> wrote:
>>
>> Daniel,
>>>
>>> Looks good to me.
>>>
>>> Thanks for fixing this!
>>>
>>> Jason
>>>
>>> 
>>> From: Daniel Fuchs 
>>> Sent: Friday, October 28, 2016 6:51 AM
>>> To: core-libs-dev
>>> Cc: Jason Mehrens
>>> Subject: RFR: 8152515: (logging) LogManager.resetLogger should ignore
>>> LinkageError
>>>
>>> Hi,
>>>
>>> Please find below a trivial  patch for:
>>>
>>> 8152515: (logging) LogManager.resetLogger should ignore LinkageError
>>> https://bugs.openjdk.java.net/browse/JDK-8152515
>>>
>>>
>>> Patch:
>>> http://cr.openjdk.java.net/~dfuchs/webrev_8152515/webrev.00/
>>>
>>> The issue might occur at shutdown, when a handler that makes uses
>>> of some APIs provided by an OSGI bundle which was already closed
>>> by the shutdown process is in turn closed by the LogManager.Cleaner
>>> thread. In that case some subclasses of LinkageError may be thrown,
>>> interrupting the reset process and preventing other handlers from
>>> being closed properly.
>>>
>>> The patch proposes to trivially ignore LinkageError at shutdown while
>>> the LogManager.Cleaner thread is running.
>>>
>>> best regards,
>>>
>>> -- daniel
>>>
>>>
>


Re: 8152515: (logging) LogManager.resetLogger should ignore LinkageError

2016-10-28 Thread Roger Riggs

Hi Jonathan,

There is no issue in this case.
LinkageError does not extend Exception so they are disjoint at the catch 
clauses.
And the compiler produces an error if a catch clause hides another 
exception to keep

the mistake from being hidden.

$.02, Roger


On 10/28/2016 12:00 PM, Jonathan Bluett-Duncan wrote:

I've an awful suspicion that the `catch (LinkageError e)` block is
unreachable, as the `catch (Exception e)` block would run first, being
located above the other block in the source code.

Is my suspicion correct?

Kind regards,
Jonathan

On 28 October 2016 at 16:36, Jason Mehrens 
wrote:


Daniel,

Looks good to me.

Thanks for fixing this!

Jason


From: Daniel Fuchs 
Sent: Friday, October 28, 2016 6:51 AM
To: core-libs-dev
Cc: Jason Mehrens
Subject: RFR: 8152515: (logging) LogManager.resetLogger should ignore
LinkageError

Hi,

Please find below a trivial  patch for:

8152515: (logging) LogManager.resetLogger should ignore LinkageError
https://bugs.openjdk.java.net/browse/JDK-8152515


Patch:
http://cr.openjdk.java.net/~dfuchs/webrev_8152515/webrev.00/

The issue might occur at shutdown, when a handler that makes uses
of some APIs provided by an OSGI bundle which was already closed
by the shutdown process is in turn closed by the LogManager.Cleaner
thread. In that case some subclasses of LinkageError may be thrown,
interrupting the reset process and preventing other handlers from
being closed properly.

The patch proposes to trivially ignore LinkageError at shutdown while
the LogManager.Cleaner thread is running.

best regards,

-- daniel





Re: 8152515: (logging) LogManager.resetLogger should ignore LinkageError

2016-10-28 Thread Daniel Fuchs

Hi Jonathan,

On 28/10/16 17:00, Jonathan Bluett-Duncan wrote:

I've an awful suspicion that the `catch (LinkageError e)` block is
unreachable, as the `catch (Exception e)` block would run first, being
located above the other block in the source code.

Is my suspicion correct?


Not really. As its name indicate, LinkageError is an Error, not a
subclass of Exception.

best regards,

-- daniel



Kind regards,
Jonathan

On 28 October 2016 at 16:36, Jason Mehrens mailto:jason_mehr...@hotmail.com>> wrote:

Daniel,

Looks good to me.

Thanks for fixing this!

Jason


From: Daniel Fuchs mailto:daniel.fu...@oracle.com>>
Sent: Friday, October 28, 2016 6:51 AM
To: core-libs-dev
Cc: Jason Mehrens
Subject: RFR: 8152515: (logging) LogManager.resetLogger should
ignore LinkageError

Hi,

Please find below a trivial  patch for:

8152515: (logging) LogManager.resetLogger should ignore LinkageError
https://bugs.openjdk.java.net/browse/JDK-8152515



Patch:
http://cr.openjdk.java.net/~dfuchs/webrev_8152515/webrev.00/


The issue might occur at shutdown, when a handler that makes uses
of some APIs provided by an OSGI bundle which was already closed
by the shutdown process is in turn closed by the LogManager.Cleaner
thread. In that case some subclasses of LinkageError may be thrown,
interrupting the reset process and preventing other handlers from
being closed properly.

The patch proposes to trivially ignore LinkageError at shutdown while
the LogManager.Cleaner thread is running.

best regards,

-- daniel






Re: 8152515: (logging) LogManager.resetLogger should ignore LinkageError

2016-10-28 Thread Jonathan Bluett-Duncan
I've an awful suspicion that the `catch (LinkageError e)` block is
unreachable, as the `catch (Exception e)` block would run first, being
located above the other block in the source code.

Is my suspicion correct?

Kind regards,
Jonathan

On 28 October 2016 at 16:36, Jason Mehrens 
wrote:

> Daniel,
>
> Looks good to me.
>
> Thanks for fixing this!
>
> Jason
>
> 
> From: Daniel Fuchs 
> Sent: Friday, October 28, 2016 6:51 AM
> To: core-libs-dev
> Cc: Jason Mehrens
> Subject: RFR: 8152515: (logging) LogManager.resetLogger should ignore
> LinkageError
>
> Hi,
>
> Please find below a trivial  patch for:
>
> 8152515: (logging) LogManager.resetLogger should ignore LinkageError
> https://bugs.openjdk.java.net/browse/JDK-8152515
>
>
> Patch:
> http://cr.openjdk.java.net/~dfuchs/webrev_8152515/webrev.00/
>
> The issue might occur at shutdown, when a handler that makes uses
> of some APIs provided by an OSGI bundle which was already closed
> by the shutdown process is in turn closed by the LogManager.Cleaner
> thread. In that case some subclasses of LinkageError may be thrown,
> interrupting the reset process and preventing other handlers from
> being closed properly.
>
> The patch proposes to trivially ignore LinkageError at shutdown while
> the LogManager.Cleaner thread is running.
>
> best regards,
>
> -- daniel
>


Re: 8152515: (logging) LogManager.resetLogger should ignore LinkageError

2016-10-28 Thread Jason Mehrens
Daniel,

Looks good to me.

Thanks for fixing this!

Jason


From: Daniel Fuchs 
Sent: Friday, October 28, 2016 6:51 AM
To: core-libs-dev
Cc: Jason Mehrens
Subject: RFR: 8152515: (logging) LogManager.resetLogger should ignore 
LinkageError

Hi,

Please find below a trivial  patch for:

8152515: (logging) LogManager.resetLogger should ignore LinkageError
https://bugs.openjdk.java.net/browse/JDK-8152515


Patch:
http://cr.openjdk.java.net/~dfuchs/webrev_8152515/webrev.00/

The issue might occur at shutdown, when a handler that makes uses
of some APIs provided by an OSGI bundle which was already closed
by the shutdown process is in turn closed by the LogManager.Cleaner
thread. In that case some subclasses of LinkageError may be thrown,
interrupting the reset process and preventing other handlers from
being closed properly.

The patch proposes to trivially ignore LinkageError at shutdown while
the LogManager.Cleaner thread is running.

best regards,

-- daniel