src/java.base/share/classes/java/lang/String.java
changeset 58713 ad69fd32778e
parent 58242 94bb65cb37d3
--- a/src/java.base/share/classes/java/lang/String.java	Mon Oct 21 15:11:44 2019 +0200
+++ b/src/java.base/share/classes/java/lang/String.java	Mon Oct 21 15:38:26 2019 +0200
@@ -2888,6 +2888,15 @@
     }
 
     /**
+     * {@preview Associated with text blocks, a preview feature of
+     *           the Java language.
+     *
+     *           This method is associated with <i>text blocks</i>, a preview
+     *           feature of the Java language. Programs can only use this
+     *           method when preview features are enabled. Preview features
+     *           may be removed in a future release, or upgraded to permanent
+     *           features of the Java language.}
+     *
      * Returns a string whose value is this string, with incidental
      * {@linkplain Character#isWhitespace(int) white space} removed from
      * the beginning and end of every line.
@@ -2963,10 +2972,9 @@
      *
      * @since 13
      *
-     * @deprecated  This method is associated with text blocks, a preview language feature.
-     *              Text blocks and/or this method may be changed or removed in a future release.
      */
-    @Deprecated(forRemoval=true, since="13")
+    @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.TEXT_BLOCKS,
+                                 essentialAPI=true)
     public String stripIndent() {
         int length = length();
         if (length == 0) {
@@ -3005,6 +3013,15 @@
     }
 
     /**
+     * {@preview Associated with text blocks, a preview feature of
+     *           the Java language.
+     *
+     *           This method is associated with <i>text blocks</i>, a preview
+     *           feature of the Java language. Programs can only use this
+     *           method when preview features are enabled. Preview features
+     *           may be removed in a future release, or upgraded to permanent
+     *           features of the Java language.}
+     *
      * Returns a string whose value is this string, with escape sequences
      * translated as if in a string literal.
      * <p>
@@ -3079,11 +3096,9 @@
      * @jls 3.10.7 Escape Sequences
      *
      * @since 13
-     *
-     * @deprecated  This method is associated with text blocks, a preview language feature.
-     *              Text blocks and/or this method may be changed or removed in a future release.
      */
-    @Deprecated(forRemoval=true, since="13")
+    @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.TEXT_BLOCKS,
+                                 essentialAPI=true)
     public String translateEscapes() {
         if (isEmpty()) {
             return "";
@@ -3309,6 +3324,15 @@
     }
 
     /**
+     * {@preview Associated with text blocks, a preview feature of
+     *           the Java language.
+     *
+     *           This method is associated with <i>text blocks</i>, a preview
+     *           feature of the Java language. Programs can only use this
+     *           method when preview features are enabled. Preview features
+     *           may be removed in a future release, or upgraded to permanent
+     *           features of the Java language.}
+     *
      * Formats using this string as the format string, and the supplied
      * arguments.
      *
@@ -3324,10 +3348,9 @@
      *
      * @since 13
      *
-     * @deprecated  This method is associated with text blocks, a preview language feature.
-     *              Text blocks and/or this method may be changed or removed in a future release.
      */
-    @Deprecated(forRemoval=true, since="13")
+    @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.TEXT_BLOCKS,
+                                 essentialAPI=true)
     public String formatted(Object... args) {
         return new Formatter().format(this, args).toString();
     }