You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jl...@apache.org on 2018/09/24 19:04:28 UTC
[incubator-netbeans] 05/07: Read output in chunks,
as that is more efficient, and to workaround a bug in ErrWriter.write(int).
This is an automated email from the ASF dual-hosted git repository.
jlahoda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
commit 427eb66a32131ace8875a3aa8c35749b206cce54
Author: Jan Lahoda <jl...@netbeans.org>
AuthorDate: Sun Sep 23 07:59:32 2018 +0200
Read output in chunks, as that is more efficient, and to workaround a bug in ErrWriter.write(int).
---
.../netbeans/modules/java/openjdk/jtreg/ActionProviderImpl.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/ActionProviderImpl.java b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/ActionProviderImpl.java
index 8dd78e1..413eadd 100644
--- a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/ActionProviderImpl.java
+++ b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/jtreg/ActionProviderImpl.java
@@ -774,10 +774,11 @@ public class ActionProviderImpl implements ActionProvider {
@Override
public void run() {
try {
+ char[] buf = new char[1024];
int read;
-
- while ((read = in.read()) != (-1)) {
- out.write(read);
+
+ while ((read = in.read(buf)) != (-1)) {
+ out.write(buf, 0, read);
}
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
---------------------------------------------------------------------
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