[BAEL-2397] Corrected formatting

This commit is contained in:
Martin van Wingerden
2020-01-29 21:15:24 +01:00
parent 34d42cca66
commit 52c7078b91
4 changed files with 83 additions and 85 deletions

View File

@@ -3,44 +3,44 @@ package com.baeldung.java14.textblocks;
public class TextBlocks13 {
public String getBlockOfHtml() {
return """
<html>
<html>
<body>
<p>example text</p>
</body>
</html>""";
<body>
<p>example text</p>
</body>
</html>""";
}
public String getNonStandardIndent() {
return """
Indent
""";
Indent
""";
}
public String getQuery() {
return """
select "id", "user"
from "table"
""";
select "id", "user"
from "table"
""";
}
public String getTextWithCarriageReturns() {
return """
separated with\r
carriage returns""";
separated with\r
carriage returns""";
}
public String getTextWithEscapes() {
return """
fun with\n
whitespace\t\r
and other escapes \"""
""";
fun with\n
whitespace\t\r
and other escapes \"""
""";
}
public String getFormattedText(String parameter) {
return """
Some parameter: %s
""".formatted(parameter);
Some parameter: %s
""".formatted(parameter);
}
}

View File

@@ -1,16 +1,16 @@
package com.baeldung.java14.textblocks;
public class TextBlocks14 {
public String getIgnoredNewLines() {
return """
public String getIgnoredNewLines() {
return """
This is a long test which looks to \
have a newline but actually does not""";
}
}
public String getEscapedSpaces() {
return """
public String getEscapedSpaces() {
return """
line 1
line 2 \s
""";
}
}
}

View File

@@ -10,7 +10,7 @@ import java.io.Serializable;
/**
* Class showcasing the usage of the Java 14 @Serial annotation.
*
*
* @author Donato Rimenti
*/
public class MySerialClass implements Serializable {