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/06/14 00:02:47 UTC

[groovy] branch GROOVY_3_0_X updated: Add a comment to avoid wrong usage

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

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


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new 40ca985  Add a comment to avoid wrong usage
40ca985 is described below

commit 40ca9853d606bc58135472b94f14223fd3f581b4
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Jun 14 08:01:01 2020 +0800

    Add a comment to avoid wrong usage
    
    (cherry picked from commit 0bc5029ccfeb15cad9ac09f2cf5e551526ef0491)
---
 src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java b/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
index f91ae27..28785f2 100644
--- a/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
+++ b/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
@@ -1035,6 +1035,7 @@ public class JavaStubGenerator {
     }
 
     public void clean() {
+        // DON'T replace `collect(Collectors.counting())` with `count()` here, otherwise peek will NOT be triggered
         javaStubCompilationUnitSet.stream().peek(FileObject::delete).collect(Collectors.counting());
         javaStubCompilationUnitSet.clear();
     }