Merge
authoramurillo
Tue, 10 Mar 2015 14:20:06 -0700
changeset 29387 112a41c05b40
parent 29386 9bb732802318 (current diff)
parent 29382 8115323eff5d (diff)
child 29388 c821b03af80a
Merge
--- a/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java	Tue Mar 10 14:09:19 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java	Tue Mar 10 14:20:06 2015 -0700
@@ -171,6 +171,11 @@
  * variables, first call {@link java.util.Map#clear() Map.clear()}
  * before adding environment variables.
  *
+ * <p>
+ * Unless otherwise noted, passing a {@code null} argument to a constructor
+ * or method in this class will cause a {@link NullPointerException} to be
+ * thrown.
+ *
  * @author Martin Buchholz
  * @since 1.5
  */
@@ -193,7 +198,6 @@
      * command.
      *
      * @param  command the list containing the program and its arguments
-     * @throws NullPointerException if the argument is null
      */
     public ProcessBuilder(List<String> command) {
         if (command == null)
@@ -228,8 +232,6 @@
      *
      * @param  command the list containing the program and its arguments
      * @return this process builder
-     *
-     * @throws NullPointerException if the argument is null
      */
     public ProcessBuilder command(List<String> command) {
         if (command == null)
@@ -554,7 +556,6 @@
          * }</pre>
          *
          * @param file The {@code File} for the {@code Redirect}.
-         * @throws NullPointerException if the specified file is null
          * @return a redirect to read from the specified file
          */
         public static Redirect from(final File file) {
@@ -581,7 +582,6 @@
          * }</pre>
          *
          * @param file The {@code File} for the {@code Redirect}.
-         * @throws NullPointerException if the specified file is null
          * @return a redirect to write to the specified file
          */
         public static Redirect to(final File file) {
@@ -612,7 +612,6 @@
          * }</pre>
          *
          * @param file The {@code File} for the {@code Redirect}.
-         * @throws NullPointerException if the specified file is null
          * @return a redirect to append to the specified file
          */
         public static Redirect appendTo(final File file) {
--- a/jdk/test/TEST.ROOT	Tue Mar 10 14:09:19 2015 -0700
+++ b/jdk/test/TEST.ROOT	Tue Mar 10 14:20:06 2015 -0700
@@ -5,10 +5,10 @@
 keys=2d dnd i18n
 
 # Tests that must run in othervm mode
-othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces
+othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation
 
 # Tests that cannot run concurrently
-exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream javax/xml/jaxp/testng/validation
+exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream
 
 # Group definitions
 groups=TEST.groups [closed/TEST.groups]
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java	Tue Mar 10 14:09:19 2015 -0700
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java	Tue Mar 10 14:20:06 2015 -0700
@@ -26,7 +26,7 @@
  * @bug 4199068 4738465 4937983 4930681 4926230 4931433 4932663 4986689
  *      5026830 5023243 5070673 4052517 4811767 6192449 6397034 6413313
  *      6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958
- *      4947220 7018606 7034570 4244896 5049299 8003488 8054494
+ *      4947220 7018606 7034570 4244896 5049299 8003488 8054494 8058464
  * @summary Basic tests for Process and Environment Variable code
  * @run main/othervm/timeout=300 Basic
  * @run main/othervm/timeout=300 -Djdk.lang.Process.launchMechanism=fork Basic
@@ -941,6 +941,14 @@
                () -> pb.redirectOutput(Redirect.from(ifile)),
                () -> pb.redirectError(Redirect.from(ifile)));
 
+        THROWS(NullPointerException.class,
+                () -> pb.redirectInput((File)null),
+                () -> pb.redirectOutput((File)null),
+                () -> pb.redirectError((File)null),
+                () -> pb.redirectInput((Redirect)null),
+                () -> pb.redirectOutput((Redirect)null),
+                () -> pb.redirectError((Redirect)null));
+
         THROWS(IOException.class,
                // Input file does not exist
                () -> pb.start());