[BAEL-2397] Corrected formatting
This commit is contained in:
parent
7d0a14d3d3
commit
4c1b542fd9
@ -1,68 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>core-java-14</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>core-java-14</name>
|
||||
<packaging>jar</packaging>
|
||||
<url>http://maven.apache.org</url>
|
||||
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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>core-java-14</artifactId>
|
||||
<name>core-java-14</name>
|
||||
<packaging>jar</packaging>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../</relativePath>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<release>${maven.compiler.release}</release>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire.plugin.version}</version>
|
||||
<configuration>
|
||||
<argLine>--enable-preview</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../</relativePath>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<release>${maven.compiler.release}</release>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire.plugin.version}</version>
|
||||
<configuration>
|
||||
<argLine>--enable-preview</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.release>14</maven.compiler.release>
|
||||
<assertj.version>3.6.1</assertj.version>
|
||||
<properties>
|
||||
<maven.compiler.release>14</maven.compiler.release>
|
||||
<assertj.version>3.6.1</assertj.version>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
|
||||
</properties>
|
||||
</properties>
|
||||
|
||||
</project>
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
""";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user