JDK 9 RFR of adding a few @jls tags to java.lang.String

joe darcy joe.darcy at oracle.com
Sat Apr 30 19:34:16 UTC 2016


Hello,

Please review the small patch below to add some JLS references to the 
string class to supplement its textual discussion of a few sections of 
the JLS.

Thanks,

-Joe


--- a/src/java.base/share/classes/java/lang/String.java    Fri Apr 29 
16:58:00 2016 -0700
+++ b/src/java.base/share/classes/java/lang/String.java    Sat Apr 30 
12:32:19 2016 -0700
@@ -117,6 +117,7 @@
   * @see     java.lang.StringBuilder
   * @see     java.nio.charset.Charset
   * @since   1.0
+ * @jls     15.18.1 String Concatenation Operator +
   */

  public final class String
@@ -2979,6 +2980,7 @@
       *
       * @return  a string that has the same contents as this string, but is
       *          guaranteed to be from a pool of unique strings.
+     * @jls 3.10.5 String Literals
       */
      public native String intern();





More information about the core-libs-dev mailing list