Skip to content

Commit c87d4c9

Browse files
committed
use textblock
1 parent f1d0ba2 commit c87d4c9

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

src/test/java/org/jabref/logic/l10n/LocalizationConsistencyTest.java

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.IOException;
44
import java.io.InputStream;
55
import java.io.InputStreamReader;
6+
import java.io.Serial;
67
import java.nio.charset.StandardCharsets;
78
import java.nio.file.DirectoryStream;
89
import java.nio.file.Files;
@@ -115,23 +116,26 @@ void languageKeysShouldNotContainHtmlBrAndHtmlP() throws IOException {
115116
entriesWithHtml
116117
.stream()
117118
.map(key -> String.format("\n%s (%s)\n", key.getKey(), key.getPath()))
118-
.collect(Collectors.toList()));
119+
.toList());
119120
}
120121

121122
@Test
122123
void findMissingLocalizationKeys() throws IOException {
123-
List<LocalizationEntry> missingKeys = LocalizationParser.findMissingKeys(LocalizationBundleForTest.LANG)
124-
.stream()
125-
.collect(Collectors.toList());
124+
List<LocalizationEntry> missingKeys = new ArrayList<>(LocalizationParser.findMissingKeys(LocalizationBundleForTest.LANG));
126125
assertEquals(Collections.emptyList(), missingKeys,
127126
missingKeys.stream()
128127
.map(key -> LocalizationKey.fromKey(key.getKey()))
129128
.map(key -> String.format("%s=%s",
130129
key.getEscapedPropertiesKey(),
131130
key.getValueForEnglishPropertiesFile()))
132131
.collect(Collectors.joining("\n",
133-
"\n\nDETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE\n" +
134-
"PASTE THESE INTO THE ENGLISH LANGUAGE FILE\n\n",
132+
"""
133+
134+
135+
DETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE
136+
PASTE THESE INTO THE ENGLISH LANGUAGE FILE
137+
138+
""",
135139
"\n\n")));
136140
}
137141

@@ -141,8 +145,12 @@ void findObsoleteLocalizationKeys() throws IOException {
141145
assertEquals(Collections.emptySet(), obsoleteKeys,
142146
obsoleteKeys.stream().collect(Collectors.joining("\n",
143147
"Obsolete keys found in language properties file: \n\n",
144-
"\n\n1. CHECK IF THE KEY IS REALLY NOT USED ANYMORE\n" +
145-
"2. REMOVE THESE FROM THE ENGLISH LANGUAGE FILE\n"))
148+
"""
149+
150+
151+
1. CHECK IF THE KEY IS REALLY NOT USED ANYMORE
152+
2. REMOVE THESE FROM THE ENGLISH LANGUAGE FILE
153+
"""))
146154
);
147155
}
148156

@@ -190,7 +198,7 @@ void languageCanBeLoaded(Language language) {
190198

191199
private static class DuplicationDetectionProperties extends Properties {
192200

193-
private static final long serialVersionUID = 1L;
201+
@Serial private static final long serialVersionUID = 1L;
194202

195203
private final List<String> duplicates = new ArrayList<>();
196204

0 commit comments

Comments
 (0)