Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5014

EJBMethodPermission implies should check for null methodname and methodSig==""

    XMLWordPrintable

    Details

      Description

      Consider the following test:

      ==============
      /**

      • Test a Method Permission for all methods of an EJB
        */
        public void testAllStarEJBMethodPermission()
        {
        EJBMethodPermission policyPerm = new EJBMethodPermission("ejbName",
        null, null, new String[0]);

      EJBMethodPermission userPerm = new EJBMethodPermission("ejbName",
      "create", dummyInterface.class.getMethods()[0]);

      EJBMethodPermission userPerm2 = new EJBMethodPermission("ejbName", "a", "LocalHome", new String[]

      {"java.lang.String"}

      );

      assertTrue(policyPerm.implies(userPerm));
      assertTrue(policyPerm.implies(userPerm2));
      }

      ========================================

      The check for userPerm2 fails.

      The permission in the Policy should check for "null" methodName (which implies "*") and also for the methodSignature to be "" (or String[0])

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  anil.saldhana Anil Saldanha
                  Reporter:
                  anil.saldhana Anil Saldanha
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: