Author: shane.bryzak(a)jboss.com
Date: 2008-06-01 21:55:59 -0400 (Sun, 01 Jun 2008)
New Revision: 8313
Modified:
trunk/src/main/org/jboss/seam/security/permission/IdentifierPolicy.java
Log:
strings identify themselves
Modified: trunk/src/main/org/jboss/seam/security/permission/IdentifierPolicy.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/IdentifierPolicy.java 2008-05-30
18:39:33 UTC (rev 8312)
+++ trunk/src/main/org/jboss/seam/security/permission/IdentifierPolicy.java 2008-06-02
01:55:59 UTC (rev 8313)
@@ -43,6 +43,11 @@
public String getIdentifier(Object target)
{
+ if (target instanceof String)
+ {
+ return (String) target;
+ }
+
IdentifierStrategy strategy = strategies.get(target.getClass());
if (strategy == null)
@@ -75,7 +80,7 @@
}
}
- return strategy.getIdentifier(target);
+ return strategy != null ? strategy.getIdentifier(target) : null;
}
public Set<IdentifierStrategy> getRegisteredStrategies()
Show replies by date