]
Norman Richards reassigned JBSEAM-3793:
---------------------------------------
Assignee: Norman Richards (was: Shane Bryzak)
Null pointer dereference of name in
org.jboss.seam.security.permission.ClassIdentifierStrategy.getIdentifierName(Class)
-----------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-3793
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3793
Project: Seam
Issue Type: Bug
Reporter: Francisco Jose Peredo Noguez
Assignee: Norman Richards
Fix For: 2.1.2.CR1
Attachments: patch.txt
Null pointer dereference of name in
org.jboss.seam.security.permission.ClassIdentifierStrategy.getIdentifierName(Class)
String name = null;
if (cls.isAnnotationPresent(Identifier.class))
{
Identifier identifier = (Identifier) cls.getAnnotation(Identifier.class);
if (identifier.name() != null && !"".equals(name.trim()))
//<--- name is ALWAYS NULL here!!!!
{
name = identifier.name();
}
}
If I change it to this:
if (identifier.name() != null && !"".equals(name))
{
name = identifier.name();
}
It is still wrong, !"".equals(null) will always be true.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: