Skip to content

Commit 1e89c55

Browse files
committed
remove unnecessary checks
1 parent f6f8f0f commit 1e89c55

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/jaxp/javax/xml/jaxp/unittest/common/jdkcatalog/JDKCatalogTest.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,8 @@ private String generateXMLWithDTDRef(String publicId, String systemId)
209209
throws Exception {
210210
Path path = Paths.get(SRC_DIR + "/dtdtest.xml");
211211
String xmlString = Files.lines(path).map(line -> {
212-
if (line.contains(PUBLIC_ID)) {
213-
line = line.replace(PUBLIC_ID, publicId);
214-
}
215-
if (line.contains(SYSTEM_ID)) {
216-
line = line.replace(SYSTEM_ID, systemId);
217-
}
212+
line = line.replace(PUBLIC_ID, publicId);
213+
line = line.replace(SYSTEM_ID, systemId);
218214
return line;
219215
}).collect(Collectors.joining(System.lineSeparator()));
220216
return xmlString;

0 commit comments

Comments
 (0)