3
3
import java .io .IOException ;
4
4
import java .io .InputStream ;
5
5
import java .io .InputStreamReader ;
6
+ import java .io .Serial ;
6
7
import java .nio .charset .StandardCharsets ;
7
8
import java .nio .file .DirectoryStream ;
8
9
import java .nio .file .Files ;
@@ -115,23 +116,26 @@ void languageKeysShouldNotContainHtmlBrAndHtmlP() throws IOException {
115
116
entriesWithHtml
116
117
.stream ()
117
118
.map (key -> String .format ("\n %s (%s)\n " , key .getKey (), key .getPath ()))
118
- .collect ( Collectors . toList () ));
119
+ .toList ());
119
120
}
120
121
121
122
@ Test
122
123
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 ));
126
125
assertEquals (Collections .emptyList (), missingKeys ,
127
126
missingKeys .stream ()
128
127
.map (key -> LocalizationKey .fromKey (key .getKey ()))
129
128
.map (key -> String .format ("%s=%s" ,
130
129
key .getEscapedPropertiesKey (),
131
130
key .getValueForEnglishPropertiesFile ()))
132
131
.collect (Collectors .joining ("\n " ,
133
- "\n \n DETECTED 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
+ """ ,
135
139
"\n \n " )));
136
140
}
137
141
@@ -141,8 +145,12 @@ void findObsoleteLocalizationKeys() throws IOException {
141
145
assertEquals (Collections .emptySet (), obsoleteKeys ,
142
146
obsoleteKeys .stream ().collect (Collectors .joining ("\n " ,
143
147
"Obsolete keys found in language properties file: \n \n " ,
144
- "\n \n 1. 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
+ """ ))
146
154
);
147
155
}
148
156
@@ -190,7 +198,7 @@ void languageCanBeLoaded(Language language) {
190
198
191
199
private static class DuplicationDetectionProperties extends Properties {
192
200
193
- private static final long serialVersionUID = 1L ;
201
+ @ Serial private static final long serialVersionUID = 1L ;
194
202
195
203
private final List <String > duplicates = new ArrayList <>();
196
204
0 commit comments