dion 2002/10/13 17:38:38
Modified: src/plugins-build/jxr/src/java/org/apache/maven/jxr
CodeTransform.java
Log:
reduce redundant call and cut memory usage
Revision Changes Path
1.4 +11 -20
jakarta-turbine-maven/src/plugins-build/jxr/src/java/org/apache/maven/jxr/CodeTransform.java
Index: CodeTransform.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/plugins-build/jxr/src/java/org/apache/maven/jxr/CodeTransform.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CodeTransform.java 2 Aug 2002 02:21:34 -0000 1.3
+++ CodeTransform.java 14 Oct 2002 00:38:38 -0000 1.4
@@ -1081,10 +1081,10 @@
}
pkg = StringUtils.replace(pkg, ";", "");
-
+ String pkgHREF = getHREF(pkg);
//if this package is within the PackageManager then you can create an
HREF for it.
- if (PackageManager.getInstance().getPackageType(pkg.toString()) != null
||
+ if (PackageManager.getInstance().getPackageType(pkg) != null ||
isPackage)
{
@@ -1093,7 +1093,7 @@
{
line = StringUtils.replace(line, classname, "<a href=\"" +
- this.getHREF(pkg.toString()) +
+ pkgHREF +
"/" +
classname +
".html" +
@@ -1104,12 +1104,12 @@
}
//now replace the given package with a href
- line = StringUtils.replace(line, pkg.toString(), "<a href=\"" +
- this.getHREF(pkg.toString()) +
+ line = StringUtils.replace(line, pkg, "<a href=\"" +
+ pkgHREF +
"/" +
DirectoryIndexer.INDEX +
"\">" +
- pkg.toString() +
+ pkg +
"</a>");
}
@@ -1287,30 +1287,21 @@
String link = null;
String find = null;
+ String href = null;
if (classType != null)
{
-
- String href = this.getHREF(packageName, classType);
-
+ href = this.getHREF(packageName, classType);
//find = packageName + "." + classType.getName();
find = classType.getName();
-
- //build out what the link would be.
- link = "<a href=\"" + href + "\">" + find + "</a>";
-
}
else
{
-
- String href = this.getHREF(packageName);
-
+ href = this.getHREF(packageName);
find = packageName;
-
- //build out what the link would be.
- link = "<a href=\"" + href + "\">" + find + "</a>";
-
}
+ //build out what the link would be.
+ link = "<a href=\"" + href + "\">" + find + "</a>";
//use the SimpleWordTokenizer to find all entries
//that match word. Then replace these with the link
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>