On 1/05/2016 5:34 AM, joe darcy wrote:
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.
Side question: what mechanism is there to detect stale references
if/when the JLS section numbers change?
David
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();