mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Use String#replace instead of String#replaceAll in tests
See gh-36678
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ class ScriptUtilsTests {
|
||||
|
||||
@Test
|
||||
void readAndSplitScriptContainingCommentsWithWindowsLineEnding() throws Exception {
|
||||
String script = readScript("test-data-with-comments.sql").replaceAll("\n", "\r\n");
|
||||
String script = readScript("test-data-with-comments.sql").replace("\n", "\r\n");
|
||||
splitScriptContainingComments(script, DEFAULT_COMMENT_PREFIXES);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ class ScriptUtilsTests {
|
||||
|
||||
@Test
|
||||
void readAndSplitScriptContainingCommentsWithWindowsLineEnding() {
|
||||
String script = readScript("test-data-with-comments.sql").replaceAll("\n", "\r\n");
|
||||
String script = readScript("test-data-with-comments.sql").replace("\n", "\r\n");
|
||||
splitScriptContainingComments(script, DEFAULT_COMMENT_PREFIXES);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -232,7 +232,7 @@ class XpathAssertionTests {
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>Test Feed</title>
|
||||
<icon>https://www.example.com/favicon.ico</icon>
|
||||
</feed>""".replaceAll("\n", "\r\n");
|
||||
</feed>""".replace("\n", "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -232,7 +232,7 @@ class XpathAssertionTests {
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>Test Feed</title>
|
||||
<icon>https://www.example.com/favicon.ico</icon>
|
||||
</feed>""".replaceAll("\n", "\r\n");
|
||||
</feed>""".replace("\n", "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user