Reference reference = (Reference)refObject;
if (reference.getTransforms().isEmpty()) {
bspEnforcer.handleBSPRule(BSPRule.R5416);
}
for (int i = 0; i < reference.getTransforms().size(); i++) {
Transform transform = (Transform)reference.getTransforms().get(i);
String algorithm = transform.getAlgorithm();
if (!(WSConstants.C14N_EXCL_OMIT_COMMENTS.equals(algorithm)
|| STRTransform.TRANSFORM_URI.equals(algorithm)
|| WSConstants.NS_XMLDSIG_FILTER2.equals(algorithm)
|| WSConstants.NS_XMLDSIG_ENVELOPED_SIGNATURE.equals(algorithm)
|| WSConstants.SWA_ATTACHMENT_COMPLETE_SIG_TRANS.equals(algorithm)
|| WSConstants.SWA_ATTACHMENT_CONTENT_SIG_TRANS.equals(algorithm))) {
bspEnforcer.handleBSPRule(BSPRule.R5423);
}
if (i == (reference.getTransforms().size() - 1)
&& !(WSConstants.C14N_EXCL_OMIT_COMMENTS.equals(algorithm)
|| STRTransform.TRANSFORM_URI.equals(algorithm)
|| WSConstants.SWA_ATTACHMENT_COMPLETE_SIG_TRANS.equals(algorithm)
|| WSConstants.SWA_ATTACHMENT_CONTENT_SIG_TRANS.equals(algorithm))) {
bspEnforcer.handleBSPRule(BSPRule.R5412);
}
if (WSConstants.C14N_EXCL_OMIT_COMMENTS.equals(algorithm)) {
parameterSpec = transform.getParameterSpec();
if (parameterSpec != null && !(parameterSpec instanceof ExcC14NParameterSpec)) {
bspEnforcer.handleBSPRule(BSPRule.R5407);
}
}
}