Review Request: JDK-8176815: Remove StackFramePermission and use RuntimePermission for stack walking

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

Review Request: JDK-8176815: Remove StackFramePermission and use RuntimePermission for stack walking

Mandy Chung
StackWalker::getInstance is currently specified to check for StackFramePermission("retainClassReference“) due to an early review feedback .  Given it has only one target, it’s overkill to define a specific permission type for stack walking use.   This patch proposes to replace the StackWalker permission check with RuntimePermission("getStackWalkerWithClassReference”) and remove StackFramePermission class.

http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8176815/webrev.00/

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

Re: Review Request: JDK-8176815: Remove StackFramePermission and use RuntimePermission for stack walking

Brent Christian-2
Hi, Mandy

I agree that the new permission type is overkill.
The changes look good to me.

-Brent

On 3/15/17 12:42 PM, Mandy Chung wrote:

> StackWalker::getInstance is currently specified to check for
> StackFramePermission("retainClassReference“) due to an early review
> feedback .  Given it has only one target, it’s overkill to define a
> specific permission type for stack walking use.   This patch proposes
> to replace the StackWalker permission check with
> RuntimePermission("getStackWalkerWithClassReference”) and remove
> StackFramePermission class.
>
> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8176815/webrev.00/
>
> Mandy
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Review Request: JDK-8176815: Remove StackFramePermission and use RuntimePermission for stack walking

Alan Bateman
In reply to this post by Mandy Chung
On 15/03/2017 19:42, Mandy Chung wrote:

> StackWalker::getInstance is currently specified to check for StackFramePermission("retainClassReference“) due to an early review feedback .  Given it has only one target, it’s overkill to define a specific permission type for stack walking use.   This patch proposes to replace the StackWalker permission check with RuntimePermission("getStackWalkerWithClassReference”) and remove StackFramePermission class.
>
> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8176815/webrev.00/
>
The target name is long but I agree with removing this permission (and
the changes look good).

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

Re: Review Request: JDK-8176815: Remove StackFramePermission and use RuntimePermission for stack walking

Mandy Chung

> On Mar 15, 2017, at 1:30 PM, Alan Bateman <[hidden email]> wrote:
>
> On 15/03/2017 19:42, Mandy Chung wrote:
>
>> StackWalker::getInstance is currently specified to check for StackFramePermission("retainClassReference“) due to an early review feedback .  Given it has only one target, it’s overkill to define a specific permission type for stack walking use.   This patch proposes to replace the StackWalker permission check with RuntimePermission("getStackWalkerWithClassReference”) and remove StackFramePermission class.
>>
>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8176815/webrev.00/
>>
> The target name is long but I agree with removing this permission (and the changes look good).

An alternative target name is “getStackWalker” that I suggested previously but doesn’t seem attracting to other.  It’s hard to anticipate if a different target name is needed in the future.

Another reason why I’m okay with this long name because it’s one character less than another target name:

  *   <td>setDefaultUncaughtExceptionHandler</td>

Mandy
Loading...