Summary
-------
Remove the preview status for the methods String::stripIndent, String::translateEscapes and String::formatted. These methods are required support for the Text Blocks language feature which is being moved from preview status to standard language feature status.
Problem
-------
The preview status of these methods prevents usage in standard Java.
Solution
--------
Remove the preview status requirement from these methods.
Specification
-------------
```
diff -r 8654e0b4763a src/java.base/share/classes/java/lang/String.java
--- a/src/java.base/share/classes/java/lang/String.java Tue Jan 14 11:45:29 2020 +0000
+++ b/src/java.base/share/classes/java/lang/String.java Tue Jan 14 12:22:45 2020 -0400
@@ -2973,8 +2973,6 @@
* @since 15
*
*/
- @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.TEXT_BLOCKS,
- essentialAPI=true)
public String stripIndent() {
int length = length();
if (length == 0) {
@@ -3107,8 +3105,6 @@
*
* @since 15
*/
- @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.TEXT_BLOCKS,
- essentialAPI=true)
public String translateEscapes() {
if (isEmpty()) {
return "";
@@ -3369,8 +3365,6 @@
* @since 15
*
*/
- @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.TEXT_BLOCKS,
- essentialAPI=true)
public String formatted(Object... args) {
return new Formatter().format(this, args).toString();
}
```