RFR[9]: 8178832: (ref) jdk.lang.ref.disableClearBeforeEnqueue property is ignored

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFR[9]: 8178832: (ref) jdk.lang.ref.disableClearBeforeEnqueue property is ignored

Kim Barrett
Please review this fix for a bug in JDK-8175797: the mechanism
provided by that change for reverting to the old behavior of
Reference.enqueue (for backward compatibility) does not work.

Also fixed the ReferenceEnqueue test changes also made as part of
JDK-8175797.  That test would havecaught the problem with the property
but for bugs in the test.

CR:
https://bugs.openjdk.java.net/browse/JDK-8178832

Webrev:
http://cr.openjdk.java.net/~kbarrett/8178832/jdk00/

Testing:
Ran fixed test with unfixed enqueue, and verified expected failure.
Ran fixed test with fixed enqueue, and verified expected pass.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR[9]: 8178832: (ref) jdk.lang.ref.disableClearBeforeEnqueue property is ignored

Mandy Chung

> On Apr 17, 2017, at 1:47 PM, Kim Barrett <[hidden email]> wrote:
>
> Please review this fix for a bug in JDK-8175797: the mechanism
> provided by that change for reverting to the old behavior of
> Reference.enqueue (for backward compatibility) does not work.
>
> Also fixed the ReferenceEnqueue test changes also made as part of
> JDK-8175797.  That test would havecaught the problem with the property
> but for bugs in the test.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8178832
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8178832/jdk00/

Looks good.  Thanks for catching this and the typo in the test.

Mandy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR[9]: 8178832: (ref) jdk.lang.ref.disableClearBeforeEnqueue property is ignored

Peter Levart
Hi Mandy, Kim,

On 04/17/2017 10:53 PM, Mandy Chung wrote:

>> On Apr 17, 2017, at 1:47 PM, Kim Barrett <[hidden email]> wrote:
>>
>> Please review this fix for a bug in JDK-8175797: the mechanism
>> provided by that change for reverting to the old behavior of
>> Reference.enqueue (for backward compatibility) does not work.
>>
>> Also fixed the ReferenceEnqueue test changes also made as part of
>> JDK-8175797.  That test would havecaught the problem with the property
>> but for bugs in the test.
>>
>> CR:
>> https://bugs.openjdk.java.net/browse/JDK-8178832
>>
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8178832/jdk00/
> Looks good.  Thanks for catching this and the typo in the test.
>
> Mandy

I wonder if there are (or will be) other places where such silent
swallowing of run-time exceptions happens or will happen. Wouldn't it be
good to "fix" Boolean.getBoolean() and friends?

I filed the following bug to track this:

https://bugs.openjdk.java.net/browse/JDK-8178966

Regards, Peter

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR[9]: 8178832: (ref) jdk.lang.ref.disableClearBeforeEnqueue property is ignored

Mandy Chung

> On Apr 19, 2017, at 2:02 AM, Peter Levart <[hidden email]> wrote:
>
> I wonder if there are (or will be) other places where such silent swallowing of run-time exceptions happens or will happen. Wouldn't it be good to "fix" Boolean.getBoolean() and friends?
>
> I filed the following bug to track this:
>
> https://bugs.openjdk.java.net/browse/JDK-8178966
>

Thanks for creating the issue.  I fully agree that we should fix this and silent swallowing the exceptions makes the underlying problem unnoticed.

Your proposed patch looks good to me.  NPE would be thrown if it’s called before the system properties are initialized.

Mandy

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR[9]: 8178832: (ref) jdk.lang.ref.disableClearBeforeEnqueue property is ignored

Kim Barrett
> On Apr 19, 2017, at 2:51 PM, Mandy Chung <[hidden email]> wrote:
>
>
>> On Apr 19, 2017, at 2:02 AM, Peter Levart <[hidden email]> wrote:
>>
>> I wonder if there are (or will be) other places where such silent swallowing of run-time exceptions happens or will happen. Wouldn't it be good to "fix" Boolean.getBoolean() and friends?
>>
>> I filed the following bug to track this:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8178966
>>
>
> Thanks for creating the issue.  I fully agree that we should fix this and silent swallowing the exceptions makes the underlying problem unnoticed.
>
> Your proposed patch looks good to me.  NPE would be thrown if it’s called before the system properties are initialized.
>
> Mandy

This looks like a good idea to me too.

Loading...