changeset 2474:5a61a4f65c9c

6960898: Regression due to src/share/classes/java/lang/ProcessBuilder.java changes Summary: Use Null{In,Out}putStream.INSTANCE as with Linux code Reviewed-by: ohair
author martin
date Sun, 13 Jun 2010 17:19:22 -0700
parents 422531c98ba5
children 76a9c90e9019 fb2d88134382
files src/solaris/classes/java/lang/UNIXProcess.java.solaris src/windows/classes/java/lang/ProcessImpl.java
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/java/lang/UNIXProcess.java.solaris	Fri Jun 11 18:55:45 2010 -0700
+++ b/src/solaris/classes/java/lang/UNIXProcess.java.solaris	Sun Jun 13 17:19:22 2010 -0700
@@ -86,7 +86,7 @@
         java.security.AccessController.doPrivileged(
         new java.security.PrivilegedAction<Void>() { public Void run() {
             if (std_fds[0] == -1)
-                stdin_stream = new ProcessBuilder.NullOutputStream();
+                stdin_stream = ProcessBuilder.NullOutputStream.INSTANCE;
             else {
                 FileDescriptor stdin_fd = new FileDescriptor();
                 fdAccess.set(stdin_fd, std_fds[0]);
@@ -95,7 +95,7 @@
             }
 
             if (std_fds[1] == -1)
-                stdout_stream = new ProcessBuilder.NullInputStream();
+                stdout_stream = ProcessBuilder.NullInputStream.INSTANCE;
             else {
                 FileDescriptor stdout_fd = new FileDescriptor();
                 fdAccess.set(stdout_fd, std_fds[1]);
@@ -104,7 +104,7 @@
             }
 
             if (std_fds[2] == -1)
-                stderr_stream = new ProcessBuilder.NullInputStream();
+                stderr_stream = ProcessBuilder.NullInputStream.INSTANCE;
             else {
                 FileDescriptor stderr_fd = new FileDescriptor();
                 fdAccess.set(stderr_fd, std_fds[2]);
--- a/src/windows/classes/java/lang/ProcessImpl.java	Fri Jun 11 18:55:45 2010 -0700
+++ b/src/windows/classes/java/lang/ProcessImpl.java	Sun Jun 13 17:19:22 2010 -0700
@@ -159,7 +159,7 @@
         new java.security.PrivilegedAction<Void>() {
         public Void run() {
             if (stdHandles[0] == -1L)
-                stdin_stream = new ProcessBuilder.NullOutputStream();
+                stdin_stream = ProcessBuilder.NullOutputStream.INSTANCE;
             else {
                 FileDescriptor stdin_fd = new FileDescriptor();
                 fdAccess.setHandle(stdin_fd, stdHandles[0]);
@@ -168,7 +168,7 @@
             }
 
             if (stdHandles[1] == -1L)
-                stdout_stream = new ProcessBuilder.NullInputStream();
+                stdout_stream = ProcessBuilder.NullInputStream.INSTANCE;
             else {
                 FileDescriptor stdout_fd = new FileDescriptor();
                 fdAccess.setHandle(stdout_fd, stdHandles[1]);
@@ -177,7 +177,7 @@
             }
 
             if (stdHandles[2] == -1L)
-                stderr_stream = new ProcessBuilder.NullInputStream();
+                stderr_stream = ProcessBuilder.NullInputStream.INSTANCE;
             else {
                 FileDescriptor stderr_fd = new FileDescriptor();
                 fdAccess.setHandle(stderr_fd, stdHandles[2]);