Quantcast

RFR: 8178708: Regtest failure: java/awt/Color/LoadProfileWithSM.java

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

RFR: 8178708: Regtest failure: java/awt/Color/LoadProfileWithSM.java

Philip Race
Bug: http://cr.openjdk.java.net/~prr/8178708/
Webrev : http://cr.openjdk.java.net/~prr/8178708/

As of the b163 module system refresh, accessing resources in a modular image
requires a new RuntimePermission.

Since we were lacking that permission getResourceAsStream failed when trying
to open an ICC Color Profile and this bubbled up into a NPE.

Fixed by adding the new permission.

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

Re: RFR: 8178708: Regtest failure: java/awt/Color/LoadProfileWithSM.java

Mandy Chung

> On Apr 14, 2017, at 8:47 AM, Phil Race <[hidden email]> wrote:
>
> Bug: http://cr.openjdk.java.net/~prr/8178708/
> Webrev : http://cr.openjdk.java.net/~prr/8178708/
>
> As of the b163 module system refresh, accessing resources in a modular image
> requires a new RuntimePermission.
>
> Since we were lacking that permission getResourceAsStream failed when trying
> to open an ICC Color Profile and this bubbled up into a NPE.
>
> Fixed by adding the new permission.

Looks okay.  

An alternative is just use doPrivileged with no limited permissions.   This is getting a resource in java.desktop module that will come from either jimage or exploded image.  In this case, no big difference between limited doPrivileged and doPrivileged in this call.

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

Re: RFR: 8178708: Regtest failure: java/awt/Color/LoadProfileWithSM.java

Alan Bateman
In reply to this post by Philip Race
On 14/04/2017 16:47, Phil Race wrote:

> Bug: http://cr.openjdk.java.net/~prr/8178708/
> Webrev : http://cr.openjdk.java.net/~prr/8178708/
>
> As of the b163 module system refresh, accessing resources in a modular
> image
> requires a new RuntimePermission.
>
> Since we were lacking that permission getResourceAsStream failed when
> trying
> to open an ICC Color Profile and this bubbled up into a NPE.
>
> Fixed by adding the new permission.
Sorry for the regression, we didn't run the AWT tests before pushing the
last refresh.

This fix looks okay to me.

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

Re: RFR: 8178708: Regtest failure: java/awt/Color/LoadProfileWithSM.java

Sergey Bylokhov
+1

>
>
> On 14/04/2017 16:47, Phil Race wrote:
>
>> Bug: http://cr.openjdk.java.net/~prr/8178708/
>> Webrev : http://cr.openjdk.java.net/~prr/8178708/
>>
>> As of the b163 module system refresh, accessing resources in a modular image
>> requires a new RuntimePermission.
>>
>> Since we were lacking that permission getResourceAsStream failed when trying
>> to open an ICC Color Profile and this bubbled up into a NPE.
>>
>> Fixed by adding the new permission.
> Sorry for the regression, we didn't run the AWT tests before pushing the last refresh.
>
> This fix looks okay to me.
>
> -Alan

Loading...