[BAEL-2397] Corrected formatting
This commit is contained in:
parent
7d0a14d3d3
commit
4c1b542fd9
@ -1,68 +1,66 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.baeldung</groupId>
|
<artifactId>core-java-14</artifactId>
|
||||||
<artifactId>core-java-14</artifactId>
|
<name>core-java-14</name>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<packaging>jar</packaging>
|
||||||
<name>core-java-14</name>
|
<url>http://maven.apache.org</url>
|
||||||
<packaging>jar</packaging>
|
|
||||||
<url>http://maven.apache.org</url>
|
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<artifactId>parent-modules</artifactId>
|
<artifactId>parent-modules</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../../</relativePath>
|
<relativePath>../../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.assertj</groupId>
|
<groupId>org.assertj</groupId>
|
||||||
<artifactId>assertj-core</artifactId>
|
<artifactId>assertj-core</artifactId>
|
||||||
<version>${assertj.version}</version>
|
<version>${assertj.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter-engine</artifactId>
|
<artifactId>junit-jupiter-engine</artifactId>
|
||||||
<version>${junit-jupiter.version}</version>
|
<version>${junit-jupiter.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${junit-jupiter.version}</version>
|
<version>${junit-jupiter.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<release>${maven.compiler.release}</release>
|
<release>${maven.compiler.release}</release>
|
||||||
<compilerArgs>--enable-preview</compilerArgs>
|
<compilerArgs>--enable-preview</compilerArgs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${surefire.plugin.version}</version>
|
<version>${surefire.plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<argLine>--enable-preview</argLine>
|
<argLine>--enable-preview</argLine>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.release>14</maven.compiler.release>
|
<maven.compiler.release>14</maven.compiler.release>
|
||||||
<assertj.version>3.6.1</assertj.version>
|
<assertj.version>3.6.1</assertj.version>
|
||||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||||
<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
|
<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -3,44 +3,44 @@ package com.baeldung.java14.textblocks;
|
|||||||
public class TextBlocks13 {
|
public class TextBlocks13 {
|
||||||
public String getBlockOfHtml() {
|
public String getBlockOfHtml() {
|
||||||
return """
|
return """
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<p>example text</p>
|
<p>example text</p>
|
||||||
</body>
|
</body>
|
||||||
</html>""";
|
</html>""";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNonStandardIndent() {
|
public String getNonStandardIndent() {
|
||||||
return """
|
return """
|
||||||
Indent
|
Indent
|
||||||
""";
|
""";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQuery() {
|
public String getQuery() {
|
||||||
return """
|
return """
|
||||||
select "id", "user"
|
select "id", "user"
|
||||||
from "table"
|
from "table"
|
||||||
""";
|
""";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTextWithCarriageReturns() {
|
public String getTextWithCarriageReturns() {
|
||||||
return """
|
return """
|
||||||
separated with\r
|
separated with\r
|
||||||
carriage returns""";
|
carriage returns""";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTextWithEscapes() {
|
public String getTextWithEscapes() {
|
||||||
return """
|
return """
|
||||||
fun with\n
|
fun with\n
|
||||||
whitespace\t\r
|
whitespace\t\r
|
||||||
and other escapes \"""
|
and other escapes \"""
|
||||||
""";
|
""";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFormattedText(String parameter) {
|
public String getFormattedText(String parameter) {
|
||||||
return """
|
return """
|
||||||
Some parameter: %s
|
Some parameter: %s
|
||||||
""".formatted(parameter);
|
""".formatted(parameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
package com.baeldung.java14.textblocks;
|
package com.baeldung.java14.textblocks;
|
||||||
|
|
||||||
public class TextBlocks14 {
|
public class TextBlocks14 {
|
||||||
public String getIgnoredNewLines() {
|
public String getIgnoredNewLines() {
|
||||||
return """
|
return """
|
||||||
This is a long test which looks to \
|
This is a long test which looks to \
|
||||||
have a newline but actually does not""";
|
have a newline but actually does not""";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEscapedSpaces() {
|
public String getEscapedSpaces() {
|
||||||
return """
|
return """
|
||||||
line 1
|
line 1
|
||||||
line 2 \s
|
line 2 \s
|
||||||
""";
|
""";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class showcasing the usage of the Java 14 @Serial annotation.
|
* Class showcasing the usage of the Java 14 @Serial annotation.
|
||||||
*
|
*
|
||||||
* @author Donato Rimenti
|
* @author Donato Rimenti
|
||||||
*/
|
*/
|
||||||
public class MySerialClass implements Serializable {
|
public class MySerialClass implements Serializable {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user