RFR: 8210469: Missing doPriviledged block and permission for jdk.zipfs module

Lance Andersen lance.andersen at oracle.com
Thu Jan 24 21:55:45 UTC 2019

Hi Mandy,

> On Jan 24, 2019, at 4:50 PM, Mandy Chung <mandy.chung at oracle.com> wrote:
> On 1/24/19 12:48 PM, Lance Andersen wrote:
>> Hi all,
>> Please review the following patch which addresses https://bugs.openjdk.java.net/browse/JDK-8210469 <https://bugs.openjdk.java.net/browse/JDK-8210469> where jdk.zipfs was missing a doPriviledged block and permission  needed when closing a zip file system when a security manager has been enabled.
>> The webrev can be found at: http://cr.openjdk.java.net/~lancea/8210469/webrev.00/index.html <http://cr.openjdk.java.net/~lancea/8210469/webrev.00/index.html>
> Alternatively you can simply do:
>             PrivilegedExceptionAction<Path> pea = () -> tempPath.toRealPath();
>             return AccessController.doPrivileged(pea); 
> In this case, limited doPrivileged does not make whole lot of difference jdk.zip explicitly grants for limited permissions and this doPrivileged block is one single operation, toRealPath.

Do you have a preference here either way?  I had that originally but changed it  to make it clearer why it was done.
> The new test has a couple of blank lines (line 64 an 83).  Formatting nit: indentation in line 74.

Addressed for when I push.

> Mandy

 <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>

More information about the core-libs-dev mailing list