geronimo-jacc_1.4_spec/src/main/java/javax/security/jacc/EJBMethodPermission.java [365:401]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        private void addEJBMethodPermission(EJBMethodPermission p) {
            MethodSpec spec = p.methodSpec;
            HashMap<String, HashMap<String, HashSet<String>>> methods =  permissions.get(p.getName());

            if (methods == ALL_METHODS) return;

            if (spec.methodName == null && spec.methodInterface == null && spec.methodParams == null) {
                permissions.put(p.getName(), ALL_METHODS);
                return;
            }

            if (methods == null) {
                methods = new HashMap<String, HashMap<String, HashSet<String>>>();
                permissions.put(p.getName(), methods);
            }

            String methodKey = (spec.methodName == null || spec.methodName.length() == 0? WILDCARD:spec.methodName);
            HashMap<String, HashSet<String>> interfaces = methods.get(methodKey);
            if (interfaces == null) {
                interfaces = new HashMap<String, HashSet<String>>();
                methods.put(methodKey, interfaces);
            }

            String interfaceKey = (spec.methodInterface == null || spec.methodInterface.length() == 0? WILDCARD:spec.methodInterface);
            HashSet<String> parameters = interfaces.get(interfaceKey);
            if (parameters == null) {
                parameters = new HashSet<String>();
                interfaces.put(interfaceKey, parameters);
            }


            // an empty string for a parameter spec indicates a method w/ no parameters
            String parametersKey = (spec.methodParams == null? WILDCARD:spec.methodParams);
            if (!parameters.contains(parametersKey)) {
                parameters.add(parametersKey);
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/EJBMethodPermission.java [365:401]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        private void addEJBMethodPermission(EJBMethodPermission p) {
            MethodSpec spec = p.methodSpec;
            HashMap<String, HashMap<String, HashSet<String>>> methods =  permissions.get(p.getName());

            if (methods == ALL_METHODS) return;

            if (spec.methodName == null && spec.methodInterface == null && spec.methodParams == null) {
                permissions.put(p.getName(), ALL_METHODS);
                return;
            }

            if (methods == null) {
                methods = new HashMap<String, HashMap<String, HashSet<String>>>();
                permissions.put(p.getName(), methods);
            }

            String methodKey = (spec.methodName == null || spec.methodName.length() == 0? WILDCARD:spec.methodName);
            HashMap<String, HashSet<String>> interfaces = methods.get(methodKey);
            if (interfaces == null) {
                interfaces = new HashMap<String, HashSet<String>>();
                methods.put(methodKey, interfaces);
            }

            String interfaceKey = (spec.methodInterface == null || spec.methodInterface.length() == 0? WILDCARD:spec.methodInterface);
            HashSet<String> parameters = interfaces.get(interfaceKey);
            if (parameters == null) {
                parameters = new HashSet<String>();
                interfaces.put(interfaceKey, parameters);
            }


            // an empty string for a parameter spec indicates a method w/ no parameters
            String parametersKey = (spec.methodParams == null? WILDCARD:spec.methodParams);
            if (!parameters.contains(parametersKey)) {
                parameters.add(parametersKey);
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



