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:01:25 UTC

[groovy] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/groovy.git


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

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

    Add a comment to avoid wrong usage
---
 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();
     }