You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2019/04/21 06:00:41 UTC
[incubator-netbeans-html4j] branch master updated: Wrap FileWriter
with BufferedWriter when used in a loop for a better performance
This is an automated email from the ASF dual-hosted git repository.
jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans-html4j.git
The following commit(s) were added to refs/heads/master by this push:
new a2199cd Wrap FileWriter with BufferedWriter when used in a loop for a better performance
new 1b5d79f Merge pull request #17 from bd2019us/BUGFIX
a2199cd is described below
commit a2199cd0c93595aba3e7b04ac604c18766090e46
Author: bd2019us <bd...@126.com>
AuthorDate: Sat Apr 13 22:27:49 2019 -0500
Wrap FileWriter with BufferedWriter when used in a loop for a better performance
---
.../src/main/java/org/netbeans/html/mojo/ProcessJsAnnotations.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/html4j-maven-plugin/src/main/java/org/netbeans/html/mojo/ProcessJsAnnotations.java b/html4j-maven-plugin/src/main/java/org/netbeans/html/mojo/ProcessJsAnnotations.java
index 6dc3de0..43f4eba 100644
--- a/html4j-maven-plugin/src/main/java/org/netbeans/html/mojo/ProcessJsAnnotations.java
+++ b/html4j-maven-plugin/src/main/java/org/netbeans/html/mojo/ProcessJsAnnotations.java
@@ -18,6 +18,7 @@
*/
package org.netbeans.html.mojo;
+import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -159,7 +160,7 @@ abstract class ProcessJsAnnotations {
if (arr.isEmpty()) {
f.delete();
} else {
- try (FileWriter w = f.writer()) {
+ try (BufferedWriter w = new BufferedWriter(f.writer())) {
for (String l : arr) {
w.write(l);
w.write("\n");
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists