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/07/09 06:21:47 UTC
[groovy] branch danielsun/tweak-java-stub updated: Trivial tweak:
no need to use buffer when write only once
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch danielsun/tweak-java-stub
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/danielsun/tweak-java-stub by this push:
new 0886a7e Trivial tweak: no need to use buffer when write only once
0886a7e is described below
commit 0886a7e49809df2cdfe8e3bd6600e1ab65db83a2
Author: Daniel Sun <su...@apache.org>
AuthorDate: Thu Jul 9 14:20:08 2020 +0800
Trivial tweak: no need to use buffer when write only once
---
.../java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
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 59f061d..74df74a 100644
--- a/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
+++ b/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
@@ -56,7 +56,6 @@ import org.objectweb.asm.Opcodes;
import javax.tools.FileObject;
import javax.tools.JavaFileObject;
-import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -143,10 +142,7 @@ public class JavaStubGenerator {
File file = createJavaStubFile(fileName);
Writer writer = new OutputStreamWriter(
- new BufferedOutputStream(
- new FileOutputStream(file),
- DEFAULT_BUFFER_SIZE
- ),
+ new FileOutputStream(file),
Charset.forName(encoding)
);