Strange test failure when referencing a class in a deprivileged module

Wang Weijun weijun.wang at oracle.com
Thu Jul 7 08:55:26 UTC 2016


> On Jul 7, 2016, at 4:47 PM, Peter Firmstone <peter.firmstone at zeus.net.au> wrote:
> 
> Sorry, I wasn't clear, I meant, create a new instance of SSL, call its checkPermission method, then make that instance your system security manager.

That would cure the test too, since it references SQLPermission when checkPermission is called.

In another reply to Alan, I said a single "new SQLPermission("setLog");" is enough.

--Max

> 
> Although the check permission call will be repeated in the test, it will have run while the standard SecurityManager is in force, so the jvm won't lazy load any classes that require permission checks, during the test permission check as that will happen during the first permission check call.
> 
> Cheers,
> 
> Peter.
> 
> Sent from my Samsung device.
>  
> ---- Original message ----
> From: Wang Weijun <weijun.wang at oracle.com>
> Sent: 07/07/2016 06:27:43 pm
> To: Peter Firmstone <peter.firmstone at zeus.net.au>
> Cc: SeanMullan <sean.mullan at oracle.com>; jigsaw-dev <jigsaw-dev at openjdk..java.net>; OpenJDK <security-dev at openjdk.java.net>
> Subject: Re: Strange test failure when referencing a class in a deprivileged module
> 
> Like this? 
> 
> https://gist.github.com/wangweij/6992aaf9617b9e2f242ddf9e391ea5f6 
> 
> The horizontal line is printed on line 706 of the gist. 
> 
> --Max 
> 
> > On Jul 7, 2016, at 12:57 PM, Peter Firmstone <peter.firmstone at zeus.net.au> wrote: 
> >  
> > Can you change the test to call checkPermission prior to setting SSL as the system security manager? 
> >  
> > This will just ensure that all necessary classes are loaded prior to SSL becoming the security manager.  
> >  
> > Regards, 
> >      
> > Peter. 
> 
> 




More information about the security-dev mailing list