User: starksm
Date: 01/08/10 10:51:32
Modified: src/main/org/jboss/security SecurityAssociation.java
Log:
Catch SecurityException that can be thrown when looking for the
org.jboss.security.SecurityAssociation.ThreadLocal system property
and use the default when access is not allowed.
Revision Changes Path
1.7 +11 -2 jboss/src/main/org/jboss/security/SecurityAssociation.java
Index: SecurityAssociation.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/security/SecurityAssociation.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SecurityAssociation.java 2001/08/03 17:15:56 1.6
+++ SecurityAssociation.java 2001/08/10 17:51:32 1.7
@@ -32,7 +32,7 @@
@author Daniel O'Connor ([EMAIL PROTECTED])
@author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>.
-@version $Revision: 1.6 $
+@version $Revision: 1.7 $
*/
public final class SecurityAssociation
{
@@ -45,7 +45,16 @@
static
{
- boolean useThreadLocal =
Boolean.getBoolean("org.jboss.security.SecurityAssociation.ThreadLocal");
+ boolean useThreadLocal = false;
+ try
+ {
+ useThreadLocal =
Boolean.getBoolean("org.jboss.security.SecurityAssociation.ThreadLocal");
+ }
+ catch(SecurityException e)
+ {
+ // Just use the default
+ }
+
if( useThreadLocal )
{
threadPrincipal = new ThreadLocal();
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development