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 2019/11/03 14:22:44 UTC

[groovy] branch master updated (ebe9d61 -> df28077)

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

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


    from ebe9d61  Trivial refactoring: remove unused imports
     new 2818b8e  Fix javadoc errors
     new df28077  Fix "java.lang.RuntimeException: No suitable ClassLoader found for grab" caused by refactoring

The 2 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/grape/Grape.java              | 29 ++++++++++++----------
 .../java/org/codehaus/groovy/ast/CompileUnit.java  |  2 +-
 .../groovy/runtime/DefaultGroovyMethods.java       |  2 +-
 3 files changed, 18 insertions(+), 15 deletions(-)


[groovy] 02/02: Fix "java.lang.RuntimeException: No suitable ClassLoader found for grab" caused by refactoring

Posted by su...@apache.org.
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 df2807701995a592763065d0e84fdfd507bd5c77
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Nov 3 22:22:23 2019 +0800

    Fix "java.lang.RuntimeException: No suitable ClassLoader found for grab" caused by refactoring
---
 src/main/java/groovy/grape/Grape.java | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/main/java/groovy/grape/Grape.java b/src/main/java/groovy/grape/Grape.java
index dfe7a37..7ab4328 100644
--- a/src/main/java/groovy/grape/Grape.java
+++ b/src/main/java/groovy/grape/Grape.java
@@ -157,21 +157,24 @@ public class Grape {
 
     public static void grab(final Map<String, Object> args, final Map... dependencies) {
         if (enableGrapes) {
-            AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
-                GrapeEngine instance = getInstance();
-                if (instance != null) {
-                    if (!args.containsKey(AUTO_DOWNLOAD_SETTING)) {
-                        args.put(AUTO_DOWNLOAD_SETTING, enableAutoDownload);
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                @Override
+                public Void run() {
+                    GrapeEngine instance = getInstance();
+                    if (instance != null) {
+                        if (!args.containsKey(AUTO_DOWNLOAD_SETTING)) {
+                            args.put(AUTO_DOWNLOAD_SETTING, enableAutoDownload);
+                        }
+                        if (!args.containsKey(DISABLE_CHECKSUMS_SETTING)) {
+                            args.put(DISABLE_CHECKSUMS_SETTING, disableChecksums);
+                        }
+                        if (!args.containsKey(GrapeEngine.CALLEE_DEPTH)) {
+                            args.put(GrapeEngine.CALLEE_DEPTH, GrapeEngine.DEFAULT_CALLEE_DEPTH + 2);
+                        }
+                        instance.grab(args, dependencies);
                     }
-                    if (!args.containsKey(DISABLE_CHECKSUMS_SETTING)) {
-                        args.put(DISABLE_CHECKSUMS_SETTING, disableChecksums);
-                    }
-                    if (!args.containsKey(GrapeEngine.CALLEE_DEPTH)) {
-                        args.put(GrapeEngine.CALLEE_DEPTH, GrapeEngine.DEFAULT_CALLEE_DEPTH + 2);
-                    }
-                    instance.grab(args, dependencies);
+                    return null;
                 }
-                return null;
             });
         }
     }


[groovy] 01/02: Fix javadoc errors

Posted by su...@apache.org.
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 2818b8e37a42353f3a82636b57dfbd886eff72b2
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Nov 3 22:06:55 2019 +0800

    Fix javadoc errors
---
 src/main/java/org/codehaus/groovy/ast/CompileUnit.java              | 2 +-
 src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/CompileUnit.java b/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
index 4344b46..9ed2172 100644
--- a/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
+++ b/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
@@ -224,7 +224,7 @@ public class CompileUnit implements NodeMetaDataHandler {
     /**
      * Represents a resolved type as a placeholder.
      *
-     * @see GROOVY-7812
+     * @see <a href="https://issues.apache.org/jira/browse/GROOVY-7812">GROOVY-7812</a>
      */
     @Internal
     public static class ConstructedOuterNestedClassNode extends ClassNode {
diff --git a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
index 3811036..04f6b5a 100644
--- a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
@@ -6209,7 +6209,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self The array of values to add together
      * @return The sum of all of the items
-     * @see #sum(java.util.Iterable)
+     * @see #sum(java.util.Iterator)
      * @since 1.7.1
      */
     public static Object sum(Object[] self) {