This is an automated email from the ASF dual-hosted git repository.
dsoumis pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 07a8df20e3 Replace text blocks, they are not supported in Java 8
07a8df20e3 is described below
commit 07a8df20e396ed37f6704c0163721e41db9f1ad0
Author: Dimitris Soumis <[email protected]>
AuthorDate: Tue Sep 2 16:02:09 2025 +0300
Replace text blocks, they are not supported in Java 8
---
.../startup/TestXmlValidationUsingContext.java | 23 ++++++++++------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git
a/test/org/apache/catalina/startup/TestXmlValidationUsingContext.java
b/test/org/apache/catalina/startup/TestXmlValidationUsingContext.java
index 35ec0c4bf8..3d0f1cf0ca 100644
--- a/test/org/apache/catalina/startup/TestXmlValidationUsingContext.java
+++ b/test/org/apache/catalina/startup/TestXmlValidationUsingContext.java
@@ -63,24 +63,21 @@ public class TestXmlValidationUsingContext extends
TomcatBaseTest {
private void writeValidXml(File webXml) throws IOException {
try (FileWriter fw = new FileWriter(webXml)) {
fw.write(
- """
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee \
- http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
- version="4.0">
- </web-app>""");
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<web-app
xmlns=\"http://xmlns.jcp.org/xml/ns/javaee\"\n" +
+ "
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
+ "
xsi:schemaLocation=\"http://xmlns.jcp.org/xml/ns/javaee " +
+
"http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd\"\n" +
+ " version=\"4.0\">\n" +
+ "</web-app>");
}
}
private void writeInvalidXml(File webXml) throws IOException {
try (FileWriter fw = new FileWriter(webXml)) {
fw.write(
- """
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app>
- </web-app>
- """);
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<web-app>\n" +
+ "</web-app>");
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]