8027447: The wrong string buffer is specified for stderr in $EXEC
authorjlaskey
Tue, 29 Oct 2013 14:22:44 -0300
changeset 21460 5fb1bd6fb113
parent 21458 eec7878b0dcd
child 21461 57b33ebf19db
8027447: The wrong string buffer is specified for stderr in $EXEC Reviewed-by: lagergren, sundar Contributed-by: james.laskey@oracle.com
nashorn/src/jdk/nashorn/internal/runtime/ScriptingFunctions.java
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptingFunctions.java	Fri Oct 25 15:21:12 2013 +0200
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptingFunctions.java	Tue Oct 29 14:22:44 2013 -0300
@@ -190,7 +190,7 @@
                 char buffer[] = new char[1024];
                 try (final InputStreamReader inputStream = new InputStreamReader(process.getErrorStream())) {
                     for (int length; (length = inputStream.read(buffer, 0, buffer.length)) != -1; ) {
-                        outBuffer.append(buffer, 0, length);
+                        errBuffer.append(buffer, 0, length);
                     }
                 } catch (IOException ex) {
                     exception[1] = ex;