Re: 8156143: Module.getResourceAsStream throws unspecified SecurityException with module in custom Layer

2016-05-26 Thread Alan Bateman



On 25/05/2016 22:25, Mandy Chung wrote:

On a related note (nothing to deal with this issue), the javadoc of 
ClassLoader::findResource(String) should be updated to reflect that it returns 
null if access to the resource is denied by the security manager, at least for 
built-in class loader as an implementation note.



I agree as it is long standing (but unspecified) behavior.

-Alan.


Re: 8156143: Module.getResourceAsStream throws unspecified SecurityException with module in custom Layer

2016-05-25 Thread Mandy Chung

> On May 25, 2016, at 2:40 AM, Alan Bateman  wrote:
> 
> This is minor mismatch between javadoc + implementation when 
> getResourceAsStream is called on a module in a custom Layer and access is 
> denied by the security manager. It's a one line fix, this is mostly just a 
> new test:
>   http://cr.openjdk.java.net/~alanb/8156143/webrev/


Looks okay.

On a related note (nothing to deal with this issue), the javadoc of 
ClassLoader::findResource(String) should be updated to reflect that it returns 
null if access to the resource is denied by the security manager, at least for 
built-in class loader as an implementation note.

Mandy

8156143: Module.getResourceAsStream throws unspecified SecurityException with module in custom Layer

2016-05-25 Thread Alan Bateman
This is minor mismatch between javadoc + implementation when 
getResourceAsStream is called on a module in a custom Layer and access 
is denied by the security manager. It's a one line fix, this is mostly 
just a new test:

   http://cr.openjdk.java.net/~alanb/8156143/webrev/

Thanks,
-Alan