Summary
Change description of the IOException
thrown by java.nio.file.Files.writeString(Path,CharSequence,OpenOption)
to state that the charset is UTF-8.
Problem
The charset is stated to be "specified charset" when it is always UTF-8.
Solution
State "UTF-8" instead of "specified charset."
Specification
--- a/src/java.base/share/classes/java/nio/file/Files.java
+++ b/src/java.base/share/classes/java/nio/file/Files.java
@@ -3654,7 +3654,7 @@ public final class Files {
* if {@code options} contains an invalid combination of options
* @throws IOException
* if an I/O error occurs writing to or creating the file, or the
- * text cannot be encoded using the specified charset
+ * text cannot be encoded using UTF-8
* @throws UnsupportedOperationException
* if an unsupported option is specified
* @throws SecurityException
- csr of
-
JDK-8288836 (fs) Files.writeString spec for IOException has "specified charset" when no charset is provided
-
- Resolved
-