diff --git a/src/java.base/share/classes/java/io/File.java b/src/java.base/share/classes/java/io/File.java index 55c389ddf67..b603e155513 100644 --- a/src/java.base/share/classes/java/io/File.java +++ b/src/java.base/share/classes/java/io/File.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2117,6 +2117,11 @@ public class File * made the name of the new file will be generated by concatenating the * prefix, five or more internally-generated characters, and the suffix. * + *

If a file with the generated name cannot be created by the + * underlying platform, then an {@code IOException} will be thrown. + * This could occur for example if the supplied prefix or suffix contains + * one or more characters not supported by the underlying file system. + * *

If the {@code directory} argument is {@code null} then the * system-dependent default temporary-file directory will be used. The * default temporary-file directory is specified by the system property