[
https://issues.jboss.org/browse/CDI-731?page=com.atlassian.jira.plugin.sy...
]
Antoine Sabot-Durand edited comment on CDI-731 at 6/27/18 8:55 AM:
-------------------------------------------------------------------
When I launch tests in
https://github.com/antoinesd/cdi-spec/tree/master/api/src/test/java/org/j...
with security manager I have ACE stack traces on the tests related to the interfaces
above. They look like:
{code:console}
java.security.AccessControlException: access denied
("java.lang.reflect.ReflectPermission" "suppressAccessChecks")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at javax.enterprise.inject.spi.AnnotatedMethod.getAnnotations(AnnotatedMethod.java:49)
at
org.jboss.cdi.api.test.annotated.AbstractAnnotatedTest.shouldFindAnnotationsOnAnnotated(AbstractAnnotatedTest.java:36)
... Removed 34 stack frames
{code}
was (Author: antoinesabot-durand):
When I launch test in
https://github.com/antoinesd/cdi-spec/tree/master/api/src/test/java/org/j...
with security manager I have ACE stack traces on the tests related to the interface above.
They're like:
{code:console}
java.security.AccessControlException: access denied
("java.lang.reflect.ReflectPermission" "suppressAccessChecks")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at javax.enterprise.inject.spi.AnnotatedMethod.getAnnotations(AnnotatedMethod.java:49)
at
org.jboss.cdi.api.test.annotated.AbstractAnnotatedTest.shouldFindAnnotationsOnAnnotated(AbstractAnnotatedTest.java:36)
... Removed 34 stack frames
{code}
Default methods in Annotated hierarchy should use privileged blocs
------------------------------------------------------------------
Key: CDI-731
URL:
https://issues.jboss.org/browse/CDI-731
Project: CDI Specification Issues
Issue Type: Bug
Components: Javadoc and API
Affects Versions: 2.0 .Final
Reporter: Antoine Sabot-Durand
Assignee: Antoine Sabot-Durand
Fix For: 2.0.SP1
To deal with repearting annotatiosn (see CDI-471), CDI 2.0 introduced default method
{{getAnnotations}}, in the following interfaces:
* {{AnnotatedConstructor}}
* {{AnnotatedField}}
* {{AnnotatedMethod}}
* {{AnnotatedParameter}}
* {{AnnotatedType}}
These methods make use of reflection and thus should use privileged blocs when used with
a security manager
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)