[infrastructure] move infered nullness warnings to error and update EEA (#8949)

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
J-N-K
2020-11-12 21:07:11 +01:00
committed by GitHub
parent 0856a0b3f2
commit ba4c96d99d
155 changed files with 644 additions and 632 deletions

View File

@@ -24,6 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.stream.Stream;
@@ -201,8 +202,10 @@ public class MqttTopicClassMapperTests {
String suffix = mapToField != null ? mapToField.suffix() : "";
assertThat(f.field.get(attributes).toString(), is(prefix + annotation.value() + suffix));
} else {
assertThat(Stream.of((String[]) f.field.get(attributes)).reduce((v, i) -> v + "," + i).orElse(""),
is(annotation.value()));
String[] attributeArray = (String[]) f.field.get(attributes);
assertNotNull(attributeArray);
Objects.requireNonNull(attributeArray);
assertThat(Stream.of(attributeArray).reduce((v, i) -> v + "," + i).orElse(""), is(annotation.value()));
}
}