[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:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user