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

      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])

              anil.saldhana Anil Saldanha (Inactive)
              anil.saldhana Anil Saldanha (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: