Skip to content

Commit 22d0707

Browse files
committed
fix: Exclude .properties from license check
1 parent 5ae49ff commit 22d0707

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

hivemq-edge/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ license {
415415
header = file("HEADER")
416416
mapping("java", "SLASHSTAR_STYLE")
417417
exclude("*.json")
418+
exclude("**/*.properties")
418419
exclude("**/*.xml")
419420
exclude("**/RollingList.java")
420421
exclude("**/api/**/*.java")

hivemq-edge/src/test/java/com/hivemq/common/i18n/I18nHttpErrorTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public void whenLocaleIsEnUS_thenErrorCountShouldMatch() throws IOException {
5555
.getResourceName(), StandardCharsets.UTF_8))) {
5656
properties.load(stringReader);
5757
}
58-
assertThat(properties.size()).isEqualTo(errors.size());
59-
final Set<Object> keySet = properties.keySet();
60-
errors.forEach(error -> assertThat(keySet.contains(error.getKey())).as(error.getKey() + " is not found.")
61-
.isTrue());
62-
properties.values().forEach(template -> {
63-
assertThat(template).isInstanceOf(String.class);
64-
assertThat((String) template).isNotBlank();
58+
final Set<Object> propertyKeySet = properties.keySet();
59+
final Set<String> errorKeySet = errors.stream().map(I18nHttpError::getKey).collect(Collectors.toSet());
60+
propertyKeySet.forEach(key -> {
61+
assertThat(key).isInstanceOf(String.class);
62+
assertThat(errorKeySet.contains((String) key)).as(key + " is not found in the enum.").isTrue();
6563
});
64+
errorKeySet.forEach(key -> assertThat(propertyKeySet.contains(key)).as(key + " is not found in the properties.")
65+
.isTrue());
6666
}
6767

6868
@Test

0 commit comments

Comments
 (0)