2 Replies Latest reply on Nov 16, 2009 8:23 PM by atamhank

    Possible bug in JpaPermissionStore.jave

    Francisco Jose Peredo Noguez Master

      Finding more bugs thanks to Findbugs, in JpaPermissionStore in the method  protected void initProperties(), at the end:


       if (rolePermissionClass != null)
       {
       //Other stuff
       }
       else if (!discriminatorProperty.isSet())
            {
               throw new RuntimeException("Invalid userPermissionClass " + rolePermissionClass.getName() +
                     " - no rolePermissionClass set and @PermissionDiscriminator annotation not found on " +
                     "any Field or Method");
            }
      



      The rolePermissionClass will be null always... the line with the throw new RuntimeException("Invalid userPermissionClass " + rolePermissionClass.getName() will crash with a null pointer exception...  am I wrong?


      Should I submit a JIRA?... I am not exactly sure about how to patch this... any hints?