8027447: The wrong string buffer is specified for stderr in $EXEC
Reviewed-by: lagergren, sundar
Contributed-by: james.laskey@oracle.com
--- 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;