7061590: Javadoc issues in Charset and StandardCharsets

Reviewed-by: alanb, jjg
This commit is contained in:
Ivan Gerasimov 2019-05-23 13:48:16 -07:00
parent 56359d42b1
commit 500ed0a5a8
2 changed files with 20 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -67,8 +67,7 @@ import java.util.TreeMap;
* concurrent threads. * concurrent threads.
* *
* *
* <a id="names"></a><a id="charenc"></a> * <h2><a id="names">Charset names</a></h2>
* <h2>Charset names</h2>
* *
* <p> Charsets are named by strings composed of the following characters: * <p> Charsets are named by strings composed of the following characters:
* *
@ -138,12 +137,11 @@ import java.util.TreeMap;
* previous canonical name be made into an alias. * previous canonical name be made into an alias.
* *
* *
* <h2>Standard charsets</h2> * <h2><a id="standard">Standard charsets</a></h2>
* *
* *
* * <p> Every implementation of the Java platform is required to support the
* <p><a id="standard">Every implementation of the Java platform is required to support the * following standard charsets. Consult the release documentation for your
* following standard charsets.</a> Consult the release documentation for your
* implementation to see if any other charsets are supported. The behavior * implementation to see if any other charsets are supported. The behavior
* of such optional charsets may differ between implementations. * of such optional charsets may differ between implementations.
* *
@ -217,7 +215,7 @@ import java.util.TreeMap;
* determined during virtual-machine startup and typically depends upon the * determined during virtual-machine startup and typically depends upon the
* locale and charset being used by the underlying operating system. </p> * locale and charset being used by the underlying operating system. </p>
* *
* <p>The {@link StandardCharsets} class defines constants for each of the * <p> The {@link StandardCharsets} class defines constants for each of the
* standard charsets. * standard charsets.
* *
* <h2>Terminology</h2> * <h2>Terminology</h2>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
package java.nio.charset; package java.nio.charset;
/** /**
* Constant definitions for the standard {@link Charset Charsets}. These * Constant definitions for the standard {@link Charset charsets}. These
* charsets are guaranteed to be available on every implementation of the Java * charsets are guaranteed to be available on every implementation of the Java
* platform. * platform.
* *
@ -44,29 +44,34 @@ public final class StandardCharsets {
} }
/** /**
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the * Seven-bit ASCII, also known as ISO646-US, also known as the
* Unicode character set * Basic Latin block of the Unicode character set.
*/ */
public static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE; public static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
/** /**
* ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1 * ISO Latin Alphabet {@literal No. 1}, also known as ISO-LATIN-1.
*/ */
public static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE; public static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
/** /**
* Eight-bit UCS Transformation Format * Eight-bit UCS Transformation Format.
*/ */
public static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE; public static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
/** /**
* Sixteen-bit UCS Transformation Format, big-endian byte order * Sixteen-bit UCS Transformation Format, big-endian byte order.
*/ */
public static final Charset UTF_16BE = new sun.nio.cs.UTF_16BE(); public static final Charset UTF_16BE = new sun.nio.cs.UTF_16BE();
/** /**
* Sixteen-bit UCS Transformation Format, little-endian byte order * Sixteen-bit UCS Transformation Format, little-endian byte order.
*/ */
public static final Charset UTF_16LE = new sun.nio.cs.UTF_16LE(); public static final Charset UTF_16LE = new sun.nio.cs.UTF_16LE();
/** /**
* Sixteen-bit UCS Transformation Format, byte order identified by an * Sixteen-bit UCS Transformation Format, byte order identified by an
* optional byte-order mark * optional byte-order mark.
*/ */
public static final Charset UTF_16 = new sun.nio.cs.UTF_16(); public static final Charset UTF_16 = new sun.nio.cs.UTF_16();
} }