Author: shane.bryzak(a)jboss.com
Date: 2008-10-23 08:40:41 -0400 (Thu, 23 Oct 2008)
New Revision: 9388
Modified:
trunk/src/main/org/jboss/seam/security/permission/EntityIdentifierStrategy.java
Log:
fixed NPE
Modified: trunk/src/main/org/jboss/seam/security/permission/EntityIdentifierStrategy.java
===================================================================
---
trunk/src/main/org/jboss/seam/security/permission/EntityIdentifierStrategy.java 2008-10-23
11:57:25 UTC (rev 9387)
+++
trunk/src/main/org/jboss/seam/security/permission/EntityIdentifierStrategy.java 2008-10-23
12:40:41 UTC (rev 9388)
@@ -12,6 +12,7 @@
import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Expressions.ValueExpression;
import org.jboss.seam.persistence.PersistenceProvider;
+import org.jboss.seam.util.Strings;
/**
* An Identifier strategy for entity-based permission checks
@@ -57,7 +58,7 @@
if (cls.isAnnotationPresent(Identifier.class))
{
Identifier identifier = (Identifier) cls.getAnnotation(Identifier.class);
- if (identifier.name() != null && !"".equals(name.trim()))
+ if ( !Strings.isEmpty(identifier.name()) )
{
name = identifier.name();
}
Show replies by date