Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-3793

Null pointer dereference of name in org.jboss.seam.security.permission.ClassIdentifierStrategy.getIdentifierName(Class)

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.1.2.CR1
    • Component/s: None
    • Labels:

      Description

      Null pointer dereference of name in org.jboss.seam.security.permission.ClassIdentifierStrategy.getIdentifierName(Class)

      String name = null;

      if (cls.isAnnotationPresent(Identifier.class))
      {
      Identifier identifier = (Identifier) cls.getAnnotation(Identifier.class);
      if (identifier.name() != null && !"".equals(name.trim())) //<--- name is ALWAYS NULL here!!!!

      { name = identifier.name(); }
      }

      If I change it to this:

      if (identifier.name() != null && !"".equals(name))
      { name = identifier.name(); }

      It is still wrong, !"".equals(null) will always be true.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                norman.richards Norman Richards
                Reporter:
                luxspes Francisco Jose Peredo Noguez
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: