From 2208126bd1792695ff11d86118c53a9160ab9fee Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 16 Jan 2006 10:59:49 +0000 Subject: [PATCH] pr121711 - from Helen - removing >1.3 apis that were introduced in previous patch. --- ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java | 12 ++++++++++-- .../org/aspectj/tools/ajdoc/DeclareFormsTest.java | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java index ba68dc299..87dc9d72c 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java @@ -228,7 +228,7 @@ class HtmlDecorator { int secondClassStartIndex = fileContents.toString().indexOf("class "); if (secondClassStartIndex != -1) { String name = decl.toSignatureString(); - int classEndIndex = fileContents.indexOf(name + "
"); + int classEndIndex = fileContents.toString().indexOf(name + "
"); if (secondClassStartIndex != -1 && classEndIndex != -1) { StringBuffer sb = new StringBuffer(fileContents.toString(). substring(secondClassStartIndex,classEndIndex)); @@ -601,8 +601,16 @@ class HtmlDecorator { + "." + 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 + diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java index 611b31b01..53dce4362 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java @@ -99,10 +99,10 @@ public class DeclareFormsTest extends AjdocTestCase { "' 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); } -- 2.39.5