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/04/25 13:19:29 UTC

[groovy] branch GROOVY-9526 updated (a9e4a2c -> 87b5af3)

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a change to branch GROOVY-9526
in repository https://gitbox.apache.org/repos/asf/groovy.git.


 discard a9e4a2c  Trivial refactoring
 discard 23db412  GROOVY-9526: Failed to reload classes with generic parameters
     new 87b5af3  GROOVY-9526: Failed to reload classes with generic parameters

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a9e4a2c)
            \
             N -- N -- N   refs/heads/GROOVY-9526 (87b5af3)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/java/groovy/util/GroovyScriptEngine.java    |  3 ++-
 src/main/java/org/codehaus/groovy/ast/ClassNode.java | 19 +------------------
 2 files changed, 3 insertions(+), 19 deletions(-)


[groovy] 01/01: GROOVY-9526: Failed to reload classes with generic parameters

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY-9526
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 87b5af3db68b7cfa537b63554d2fbd0a52eeef79
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Apr 25 21:18:49 2020 +0800

    GROOVY-9526: Failed to reload classes with generic parameters
---
 src/main/java/groovy/util/GroovyScriptEngine.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/groovy/util/GroovyScriptEngine.java b/src/main/java/groovy/util/GroovyScriptEngine.java
index 7afd183..829dbaa 100644
--- a/src/main/java/groovy/util/GroovyScriptEngine.java
+++ b/src/main/java/groovy/util/GroovyScriptEngine.java
@@ -24,6 +24,7 @@ import groovy.lang.GroovyCodeSource;
 import groovy.lang.GroovyResourceLoader;
 import groovy.lang.Script;
 import org.codehaus.groovy.GroovyBugError;
+import org.codehaus.groovy.ast.ClassHelper;
 import org.codehaus.groovy.ast.ClassNode;
 import org.codehaus.groovy.classgen.GeneratorContext;
 import org.codehaus.groovy.control.ClassNodeResolver;
@@ -198,7 +199,7 @@ public class GroovyScriptEngine implements ResourceConnector {
                                 precompiledEntries.put(origName, path);
                             }
                             if (clazz != null) {
-                                ClassNode cn = new ClassNode(clazz);
+                                ClassNode cn = ClassHelper.make(clazz);
                                 return new LookupResult(null, cn);
                             }
                         } catch (ResourceException re) {