protected Set<String> buildAllowedMethods(Element element, PackageConfig.Builder packageContext) { NodeList allowedMethodsEls = element.getElementsByTagName("allowed-methods"); Set<String> allowedMethods = null; if (allowedMethodsEls.getLength() > 0) { allowedMethods = new HashSet<String>(); Node n = allowedMethodsEls.item(0).getFirstChild(); if (n != null) { String s = n.getNodeValue().trim(); if (s.length() > 0) { allowedMethods = TextParseUtil.commaDelimitedStringToSet(s); } } } else if (packageContext.isStrictMethodInvocation()) { allowedMethods = new HashSet<String>(); } return allowedMethods; }
actionConfig.methodName(actionMethod); if (pkgCfg.isStrictMethodInvocation()) { actionConfig.addAllowedMethod(actionMethod); actionConfig.addAllowedMethod(allowedMethods);