8285523: Improve test java/io/FileOutputStream/OpenNUL.java

Reviewed-by: bae
Backport-of: f42631e354d4abf7994abd92aa5def6b2ceeab3a
This commit is contained in:
Olga Mikhaltsova 2022-06-29 19:06:49 +00:00 committed by Andrew Brygin
parent cb07ad2c43
commit c05358d999

View File

@ -26,7 +26,9 @@
* @bug 8285445
* @requires (os.family == "windows")
* @summary Verify behavior of opening "NUL:" with ADS enabled and disabled.
* @run main/othervm OpenNUL
* @run main/othervm -Djdk.io.File.enableADS OpenNUL
* @run main/othervm -Djdk.io.File.enableADS=FalsE OpenNUL
* @run main/othervm -Djdk.io.File.enableADS=true OpenNUL
*/
@ -36,7 +38,7 @@ import java.io.IOException;
public class OpenNUL {
public static void main(String args[]) throws IOException {
String enableADS = System.getProperty("jdk.io.File.enableADS");
String enableADS = System.getProperty("jdk.io.File.enableADS", "true");
boolean fails = enableADS.equalsIgnoreCase(Boolean.FALSE.toString());
FileOutputStream fos;