if (urlPatterns != null && urlPatterns.size() > 0) {
WebBundleDescriptor webBundleDesc = webCompDesc.getWebBundleDescriptor();
ServletSecurity servletSecurityAn = (ServletSecurity)ainfo.getAnnotation();
HttpConstraint httpConstraint = servletSecurityAn.value();
SecurityConstraint securityConstraint =
createSecurityConstraint(webBundleDesc,
urlPatterns, httpConstraint.rolesAllowed(),
httpConstraint.value(),
httpConstraint.transportGuarantee(),
null);
// we know there is one WebResourceCollection there
WebResourceCollection webResColl =
securityConstraint.getWebResourceCollections().iterator().next();
HttpMethodConstraint[] httpMethodConstraints = servletSecurityAn.httpMethodConstraints();
for (HttpMethodConstraint httpMethodConstraint : httpMethodConstraints) {
String httpMethod = httpMethodConstraint.value();
if (httpMethod == null || httpMethod.length() == 0) {
return getDefaultFailedResult();