You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/01/11 17:31:05 UTC
[groovy] 04/04: Trivial refactoring: extract common variable
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 55646d5ec48a56f25aa00cbc17b6f31a4058b3d7
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Jan 12 01:29:48 2020 +0800
Trivial refactoring: extract common variable
---
.../org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
index 69f1177..ff1221c 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
@@ -500,9 +500,10 @@ public class SimpleGroovyClassDoc extends SimpleGroovyAbstractableElementDoc imp
return "<a href='" + resolveMethodArgs(rootDoc, classDoc, type) + "'>" + (label == null ? type.substring(1) : label) + "</a>";
if (type.endsWith("[]")) {
+ String componentType = type.substring(0, type.length() - 2);
if (label != null)
- return getDocUrl(type.substring(0, type.length() - 2) + " " + label, full, links, relativePath, rootDoc, classDoc);
- return getDocUrl(type.substring(0, type.length() - 2), full, links, relativePath, rootDoc, classDoc) + "[]";
+ return getDocUrl(componentType + " " + label, full, links, relativePath, rootDoc, classDoc);
+ return getDocUrl(componentType, full, links, relativePath, rootDoc, classDoc) + "[]";
}
if (!type.contains(".") && classDoc != null) {