Re: RFR: 8285523: Improve test java/io/FileOutputStream/OpenNUL.java
On Thu, 28 Apr 2022 15:43:09 GMT, Andrew John Hughes wrote: >> The new test added as part of the >> [JDK-8285445](https://bugs.openjdk.java.net/browse/JDK-8285445) cannot >> trigger that bug and pass w/ and w/o fix. >> >> An updated test validates the "default" case when the >> `jdk.io.File.enableADS` property is not set, in this case the ADS should be >> [accepted](https://github.com/openjdk/jdk/blob/9d9f4e502f6ddc3116ed9b80f7168a1edfce839e/src/java.base/windows/classes/java/io/WinNTFileSystem.java#L59). > > test/jdk/java/io/FileOutputStream/OpenNUL.java line 31: > >> 29: * @run main/othervm OpenNUL >> 30: * @run main/othervm -Djdk.io.File.enableADS OpenNUL >> 31: * @run main/othervm -Djdk.io.File.enableADS=FalsE OpenNUL > > Is there a reason for the mixed case? Just to check equalsIgnoreCase is being > used? Yes only for equalsIgnoreCase - PR: https://git.openjdk.java.net/jdk/pull/8379
Re: RFR: 8285523: Improve test java/io/FileOutputStream/OpenNUL.java
On Mon, 25 Apr 2022 04:35:13 GMT, Sergey Bylokhov wrote: > The new test added as part of the > [JDK-8285445](https://bugs.openjdk.java.net/browse/JDK-8285445) cannot > trigger that bug and pass w/ and w/o fix. > > An updated test validates the "default" case when the `jdk.io.File.enableADS` > property is not set, in this case the ADS should be > [accepted](https://github.com/openjdk/jdk/blob/9d9f4e502f6ddc3116ed9b80f7168a1edfce839e/src/java.base/windows/classes/java/io/WinNTFileSystem.java#L59). Marked as reviewed by bpb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8379
Re: RFR: 8285523: Improve test java/io/FileOutputStream/OpenNUL.java
On Mon, 25 Apr 2022 04:35:13 GMT, Sergey Bylokhov wrote: > The new test added as part of the > [JDK-8285445](https://bugs.openjdk.java.net/browse/JDK-8285445) cannot > trigger that bug and pass w/ and w/o fix. > > An updated test validates the "default" case when the `jdk.io.File.enableADS` > property is not set, in this case the ADS should be > [accepted](https://github.com/openjdk/jdk/blob/9d9f4e502f6ddc3116ed9b80f7168a1edfce839e/src/java.base/windows/classes/java/io/WinNTFileSystem.java#L59). Changes look right to me. The test seems to have been based on the situation pre-patch, where setting the property to `true` worked around the bug. With the patch, only the `false` case actually exhibits the bug. test/jdk/java/io/FileOutputStream/OpenNUL.java line 31: > 29: * @run main/othervm OpenNUL > 30: * @run main/othervm -Djdk.io.File.enableADS OpenNUL > 31: * @run main/othervm -Djdk.io.File.enableADS=FalsE OpenNUL Is there a reason for the mixed case? Just to check equalsIgnoreCase is being used? - Marked as reviewed by andrew (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8379