groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [39/40] groovy git commit: GROOVY-8117: Do not resolve aliased imports early.
Date Sat, 22 Apr 2017 01:19:46 GMT
GROOVY-8117: Do not resolve aliased imports early.


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/2672aa71
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/2672aa71
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/2672aa71

Branch: refs/heads/parrot
Commit: 2672aa7112cde4d47c3c24627ff72eb7da41e100
Parents: fe636a0
Author: Mikko Värri <vmj@linuxbox.fi>
Authored: Sun Mar 12 03:48:40 2017 +0200
Committer: paulk <paulk@asert.com.au>
Committed: Sat Apr 22 10:03:47 2017 +1000

----------------------------------------------------------------------
 .../groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/2672aa71/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
index 678f2e3..b7ce2b1 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDocAssembler.java
@@ -742,7 +742,7 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements
Gro
         return returnValue;
     }
 
-    // preempt resolve as info is partially available here (star imports won't match here)
+    // preempt resolve as info is partially available here (aliases and star imports won't
match here)
     private String extractName(GroovySourceAST typeNode) {
         String typeName = buildName(typeNode);
         if (!typeName.contains("/")) {
@@ -750,7 +750,7 @@ public class SimpleGroovyClassDocAssembler extends VisitorAdapter implements
Gro
             // Groovy currently resolves this to last found so traverse in reverse order
             for (int i = importedClassesAndPackages.size() - 1; i >= 0; i--) {
                 String name = importedClassesAndPackages.get(i);
-                if (name.endsWith(slashName)) {
+                if (!aliases.containsValue(name) && name.endsWith(slashName)) {
                     typeName = name;
                     break;
                 }


Mime
View raw message