int secondClassStartIndex = fileContents.toString().indexOf("class <B>");
if (secondClassStartIndex != -1) {
String name = decl.toSignatureString();
- int classEndIndex = fileContents.indexOf(name + "</B><DT>");
+ int classEndIndex = fileContents.toString().indexOf(name + "</B><DT>");
if (secondClassStartIndex != -1 && classEndIndex != -1) {
StringBuffer sb = new StringBuffer(fileContents.toString().
substring(secondClassStartIndex,classEndIndex));
+ "." + currDecl.toLabelString();
// need to replace " with quot; otherwise the links wont work
+ // for 'matches declare' relationship
+ StringBuffer sb = new StringBuffer(currDecl.toLabelString());
+ int nextQuote = sb.toString().indexOf("\"");
+ while (nextQuote != -1) {
+ sb.deleteCharAt(nextQuote);
+ sb.insert(nextQuote,"quot;");
+ nextQuote = sb.toString().indexOf("\"");
+ }
hrefLink += currDecl.getParent().toLinkLabelString() + ".html"
- + "#" + currDecl.toLabelString().replaceAll("\"","quot;");
+ + "#" + sb.toString();
if (!addedNames.contains(hrefName)) {
adviceDoc = adviceDoc +
"' in the Declare Detail section", b);
b = AjdocOutputChecker.summarySectionContainsRel(
htmlFile,"DECLARE SUMMARY",
- declareWarning,
+ declareWarningQuotes,
HtmlDecorator.HtmlRelationshipKind.MATCHED_BY,
doItHref);
- assertTrue("Should have '" + declareWarning + " matched by " + doItHref +
+ assertTrue("Should have '" + declareWarningQuotes + " matched by " + doItHref +
"' in the Declare Summary section", b);
}