diff --git a/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java b/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java index 6041e6d995..e83cfb3771 100644 --- a/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java +++ b/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java @@ -475,11 +475,11 @@ public class RuleSetFactoryTest { + " is missing 'externalInfoURL' attribute" + PMD.EOL; } else { - String expectedExternalInfoURL = "http://pmd.sourceforge.net/snapshot/rules/" + String expectedExternalInfoURL = "http://pmd.sourceforge.net/.+/rules/" + fileName.replaceAll("rulesets/", "").replaceAll( ".xml", "") + ".html#" + rule.getName(); - if (!expectedExternalInfoURL.equals(rule - .getExternalInfoUrl())) { + if (rule.getExternalInfoUrl() == null + || !rule.getExternalInfoUrl().matches(expectedExternalInfoURL)) { invalidExternalInfoURL++; messages += "Rule " + fileName