Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8274122

java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11

    XMLWordPrintable

Details

    • b22
    • generic
    • windows

    Backports

      Description

        This test case fails during creation of files with OS reserved/forbidden file name eg : com7, LPT1.

        Other Windows versions throws IOException with message "Unable to create temporary file..." and won't create that file whenever try to create a temporary file with reserved/forbidden name. But in Windows 11 it's successfully creating that files, that's why test case fails.
        It may be Windows 11 platform issue or some intended change in Windows 11.

        This feature is implemented during JDK8 by task JDK-8013827.

        Exception stack trace:
        In test ReservedName, creating temp file with prefix, LPT1.package.zip, suffix, .temp, in dir, .\13438486632578688224
        STDERR:
        java.lang.RuntimeException: IOException is expected
                at SpecialTempFile.test(SpecialTempFile.java:79)
                at SpecialTempFile.main(SpecialTempFile.java:108)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:568)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:833)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: IOException is expected

        Attachments

          Issue Links

            Activity

              People

                bpb Brian Burkhalter
                akolarkunnu Abdul Kolarkunnu
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: