8326853: Missing @since tags for Charset related methods added in Java 10

Reviewed-by: jlu, naoto
This commit is contained in:
Nizar Benalla 2024-03-22 16:11:30 +00:00 committed by Justin Lu
parent ce7ebaa606
commit 4d932d615c
2 changed files with 12 additions and 2 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Alibaba Group Holding Limited. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -2299,6 +2299,8 @@ public final class Formatter implements Closeable, Flushable {
*
* @throws NullPointerException
* if {@code fileName} or {@code charset} is {@code null}.
*
* @since 10
*/
public Formatter(String fileName, Charset charset, Locale l) throws IOException {
this(Objects.requireNonNull(charset, "charset"), l, new File(fileName));
@ -2443,6 +2445,8 @@ public final class Formatter implements Closeable, Flushable {
*
* @throws NullPointerException
* if {@code file} or {@code charset} is {@code null}.
*
* @since 10
*/
public Formatter(File file, Charset charset, Locale l) throws IOException {
this(Objects.requireNonNull(charset, "charset"), l, file);
@ -2560,6 +2564,8 @@ public final class Formatter implements Closeable, Flushable {
*
* @throws NullPointerException
* if {@code os} or {@code charset} is {@code null}.
*
* @since 10
*/
public Formatter(OutputStream os, Charset charset, Locale l) {
this(l, new BufferedWriter(new OutputStreamWriter(os, charset)));