<AWT Dev> [10] RFR 8193435: Remove pre-1.2 SecurityManager text from java.awt.Toolkit

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

<AWT Dev> [10] RFR 8193435: Remove pre-1.2 SecurityManager text from java.awt.Toolkit

Dmitry Markov
Hello,

Could you review a fix for jdk10, please?

 bug: https://bugs.openjdk.java.net/browse/JDK-8193435
 webrev: http://cr.openjdk.java.net/~dmarkov/8193435/webrev.00/
 CSR: https://bugs.openjdk.java.net/browse/JDK-8193709

Problem description:
Support for pre-JDK 1.2 SecurityManager was removed under JDK-8189750

Fix:
Updated the description of java.awt.Toolkit.getImage(URL u) and java.awt.Toolkit.createImage(URL u) to get rid of “pre-JDK 1.2 SecurityManager” text. Also removed corresponding fallback code from SunToolkit.checkPermission() and the constructor of URLImageSource.

Thanks,
Dmitry
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] RFR 8193435: Remove pre-1.2 SecurityManager text from java.awt.Toolkit

Sergey Bylokhov
Looks fine.

On 18/12/2017 08:47, Dmitry Markov wrote:

> Hello,
>
> Could you review a fix for jdk10, please?
>
>   bug: https://bugs.openjdk.java.net/browse/JDK-8193435
>   webrev: http://cr.openjdk.java.net/~dmarkov/8193435/webrev.00/
>   CSR: https://bugs.openjdk.java.net/browse/JDK-8193709
>
> Problem description:
> Support for pre-JDK 1.2 SecurityManager was removed under JDK-8189750
>
> Fix:
> Updated the description of java.awt.Toolkit.getImage(URL u) and
> java.awt.Toolkit.createImage(URL u) to get rid of “pre-JDK 1.2
> SecurityManager” text. Also removed corresponding fallback code from
> SunToolkit.checkPermission() and the constructor of URLImageSource.
>
> Thanks,
> Dmitry


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] RFR 8193435: Remove pre-1.2 SecurityManager text from java.awt.Toolkit

Phil Race
Dmitry,

Did you confirm that there are no tests that check for this removed
behaviour ?

-phil.

On 12/18/2017 10:01 AM, Sergey Bylokhov wrote:

> Looks fine.
>
> On 18/12/2017 08:47, Dmitry Markov wrote:
>> Hello,
>>
>> Could you review a fix for jdk10, please?
>>
>>   bug: https://bugs.openjdk.java.net/browse/JDK-8193435
>>   webrev: http://cr.openjdk.java.net/~dmarkov/8193435/webrev.00/
>>   CSR: https://bugs.openjdk.java.net/browse/JDK-8193709
>>
>> Problem description:
>> Support for pre-JDK 1.2 SecurityManager was removed under JDK-8189750
>>
>> Fix:
>> Updated the description of java.awt.Toolkit.getImage(URL u) and
>> java.awt.Toolkit.createImage(URL u) to get rid of “pre-JDK 1.2
>> SecurityManager” text. Also removed corresponding fallback code from
>> SunToolkit.checkPermission() and the constructor of URLImageSource.
>>
>> Thanks,
>> Dmitry
>
>

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] RFR 8193435: Remove pre-1.2 SecurityManager text from java.awt.Toolkit

Sean Mullan
In reply to this post by Dmitry Markov
This looks good to me. The JDK SecurityManager implementation of
checkRead and checkConnect have both been changed to call
checkPermission since JDK 1.2 so the fallback code is redundant.

--Sean

On 12/18/17 11:47 AM, Dmitry Markov wrote:

> Hello,
>
> Could you review a fix for jdk10, please?
>
>   bug: https://bugs.openjdk.java.net/browse/JDK-8193435
>   webrev: http://cr.openjdk.java.net/~dmarkov/8193435/webrev.00/
>   CSR: https://bugs.openjdk.java.net/browse/JDK-8193709
>
> Problem description:
> Support for pre-JDK 1.2 SecurityManager was removed under JDK-8189750
>
> Fix:
> Updated the description of java.awt.Toolkit.getImage(URL u) and
> java.awt.Toolkit.createImage(URL u) to get rid of “pre-JDK 1.2
> SecurityManager” text. Also removed corresponding fallback code from
> SunToolkit.checkPermission() and the constructor of URLImageSource.
>
> Thanks,
> Dmitry
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] RFR 8193435: Remove pre-1.2 SecurityManager text from java.awt.Toolkit

Dmitry Markov
In reply to this post by Phil Race
Phil,

As it was pointed out by Sean the fallback code was redundant. It just invoked the same checkPermission() method and didn’t perform any specific checks. It is very unlikely that the removal of the fallback code will cause some test failures. However I ran the corresponding AWT and Swing regression tests and did not observe any problems caused by the fix.

Thanks,
Dmitry

> On 18 Dec 2017, at 18:14, Phil Race <[hidden email]> wrote:
>
> Dmitry,
>
> Did you confirm that there are no tests that check for this removed behaviour ?
>
> -phil.
>
> On 12/18/2017 10:01 AM, Sergey Bylokhov wrote:
>> Looks fine.
>>
>> On 18/12/2017 08:47, Dmitry Markov wrote:
>>> Hello,
>>>
>>> Could you review a fix for jdk10, please?
>>>
>>>  bug: https://bugs.openjdk.java.net/browse/JDK-8193435
>>>  webrev: http://cr.openjdk.java.net/~dmarkov/8193435/webrev.00/
>>>  CSR: https://bugs.openjdk.java.net/browse/JDK-8193709
>>>
>>> Problem description:
>>> Support for pre-JDK 1.2 SecurityManager was removed under JDK-8189750
>>>
>>> Fix:
>>> Updated the description of java.awt.Toolkit.getImage(URL u) and java.awt.Toolkit.createImage(URL u) to get rid of “pre-JDK 1.2 SecurityManager” text. Also removed corresponding fallback code from SunToolkit.checkPermission() and the constructor of URLImageSource.
>>>
>>> Thanks,
>>> Dmitry
>>
>>
>