mirror of https://github.com/dspinellis/UMLGraph
Merge pull request #49 from kno10/patch-3
Strip generics from parent classes properly, fixes #20
This commit is contained in:
commit
7cc92e6fa2
|
|
@ -1013,8 +1013,17 @@ class ClassGraph {
|
|||
int openIdx = name.indexOf('<');
|
||||
if(openIdx == -1)
|
||||
return name;
|
||||
else
|
||||
return name.substring(0, openIdx);
|
||||
StringBuilder buf = new StringBuilder(name.length());
|
||||
for (int i = 0, depth = 0; i < name.length(); i++) {
|
||||
char c = name.charAt(i);
|
||||
if (c == '<')
|
||||
depth++;
|
||||
else if (c == '>')
|
||||
depth--;
|
||||
else if (depth == 0)
|
||||
buf.append(c);
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
/** Convert the class name into a corresponding URL */
|
||||
|
|
|
|||
Loading…
Reference in New Issue