[jboss-jira] [JBoss JIRA] (ELY-161) Deprecated Reflection in security manager

David Lloyd (JIRA) issues at jboss.org
Wed Nov 18 08:22:00 EST 2015


    [ https://issues.jboss.org/browse/ELY-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130250#comment-13130250 ] 

David Lloyd commented on ELY-161:
---------------------------------

The Java 9 replacement API is in the final approval process.  It is called StackWalker ([JavaDoc|http://cr.openjdk.java.net/~mchung/jdk9/jep259/api/java/lang/StackWalker.html]).

Once Java 9 is released, we should create a new wildfly-elytron-java9 project which provides just the WildFlySecurityManager and StackInspector classes using StackWalker.  Then this should be compiled into a JAR and sucked in to the main Elytron project using Java 9 multi-version JARs, allowing our Elytron JAR to work under both Java 8 and Java 9.

> Deprecated Reflection in security manager
> -----------------------------------------
>
>                 Key: ELY-161
>                 URL: https://issues.jboss.org/browse/ELY-161
>             Project: WildFly Elytron
>          Issue Type: Task
>          Components: Security Manager
>            Reporter: Jan Kalina
>            Priority: Minor
>             Fix For: 2.0.0.Alpha1
>
>
> WildFly security manager use deprecated API for getting of caller.
> Currently only public API to look at the call stack as Class instances, which will not be removed in future, is {{SecurityManager.getClassContext()}}, which is inefficient to use in performance critical parts.
> Efficient replacement of this API not exist yet, should be added in Java 9:
> https://bugs.openjdk.java.net/browse/JDK-8043814
> *This task can be resolved only after resolving JDK-8043814.*
> When mentioned enhancement proposial will be implemented, it shoudl replace current {{SecurityManager.getClassContext()}} fallback. But this new API only replace current fallback for Java 9 - deprecated API must stay for Java 8.
> This issue is related to following build warning: (mentioned for search)
> {code}
> WildFlySecurityManager.java:[117,32] getCallerClass(int) in sun.reflect.Reflection has been deprecated
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list