[jboss-jira] [JBoss JIRA] (WFLY-8438) EJBComponentDescription : possible NPE on securityRoles
Farah Juma (JIRA)
issues at jboss.org
Thu Mar 23 15:27:00 EDT 2017
[ https://issues.jboss.org/browse/WFLY-8438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Farah Juma moved JBEAP-9854 to WFLY-8438:
-----------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-8438 (was: JBEAP-9854)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: EJB
(was: EJB)
Affects Version/s: (was: 7.1.0.DR12)
> EJBComponentDescription : possible NPE on securityRoles
> -------------------------------------------------------
>
> Key: WFLY-8438
> URL: https://issues.jboss.org/browse/WFLY-8438
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Reporter: Farah Juma
> Assignee: Farah Juma
>
> In https://github.com/wildfly/wildfly/commit/38f8f5915b40d036bd0fd1a904d6a13916f3fa2c#diff-faf7ca63d4b901f1bff0697491c8f5ddL1147 you added check on {{if (securityRoles != null)}}.
> securityRoles is not checked few lines below your check (in different if block)
> https://github.com/wildfly/wildfly/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/EJBComponentDescription.java#L1162 (securityRoles.getSecurityRoleNamesByPrincipal ... )
> I suggest to change https://github.com/wildfly/wildfly/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/component/EJBComponentDescription.java#L1158 from
> {code}
> if (runAsPrincipal != null) {
> {code}
> to
> {code}
> if ((securityRoles != null) && (runAsPrincipal != null)) {
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list