Fix bug where infinite recursion isn't detected in getNodeHref()
This commit is contained in:
parent
a21e6464f6
commit
304c08f8a3
1 changed files with 10 additions and 4 deletions
|
@ -1077,7 +1077,7 @@ public final class Application implements IPathElement, Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void composeHref(Object elem, StringBuffer b, int pathCount) {
|
private final void composeHref(Object elem, StringBuffer b, int pathCount) {
|
||||||
if ((elem == null) || (pathCount > 20)) {
|
if ((elem == null) || (pathCount > 50)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1091,10 +1091,16 @@ public final class Application implements IPathElement, Runnable {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
composeHref(getParentElement(elem), b, pathCount++);
|
// recurse to parent element
|
||||||
b.append(UrlEncoded.encode(getElementName(elem)));
|
composeHref(getParentElement(elem), b, ++pathCount);
|
||||||
|
|
||||||
|
// append ourselves
|
||||||
|
String ename = getElementName(elem);
|
||||||
|
if (ename != null) {
|
||||||
|
b.append(UrlEncoded.encode(ename));
|
||||||
b.append("/");
|
b.append("/");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the baseURI for Hrefs in this application.
|
* Returns the baseURI for Hrefs in this application.
|
||||||
|
|
Loading…
Add table
Reference in a new issue