[jboss-cvs] jboss-seam/src/main/org/jboss/seam/security ...

Shane Bryzak sbryzak at redhat.com
Mon Oct 8 11:18:15 EDT 2007


  User: sbryzak2
  Date: 07/10/08 11:18:15

  Modified:    src/main/org/jboss/seam/security  RuleBasedIdentity.java
  Log:
  fixed NPE
  
  Revision  Changes    Path
  1.18      +8 -5      jboss-seam/src/main/org/jboss/seam/security/RuleBasedIdentity.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RuleBasedIdentity.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/RuleBasedIdentity.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- RuleBasedIdentity.java	3 Oct 2007 03:14:48 -0000	1.17
  +++ RuleBasedIdentity.java	8 Oct 2007 15:18:15 -0000	1.18
  @@ -159,6 +159,8 @@
      @Override
      public boolean hasRole(String role)
      {
  +      if (securityContext != null)
  +      {
         Iterator<Role> iter = securityContext.iterateObjects(new ClassObjectFilter(Role.class));
         
         while (iter.hasNext())
  @@ -166,6 +168,7 @@
            Role r = iter.next();
            if (r.getName().equals(role)) return true;
         }
  +      }
         
         return super.hasRole(role);
      }
  
  
  



More information about the jboss-cvs-commits mailing list