Java 17 features (itests) (#15583)

- replace Collections by List.of and Set.of
- instanceof
- SAT warnings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2023-09-13 08:06:37 +02:00
committed by GitHub
parent ab58f4ffb4
commit b3e88ae29e
15 changed files with 45 additions and 49 deletions

View File

@@ -22,8 +22,8 @@ import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Collections;
import java.util.Locale;
import java.util.Set;
import java.util.TimeZone;
import org.junit.jupiter.api.AfterAll;
@@ -483,7 +483,7 @@ public class NtpOSGiTest extends JavaOSGiTest {
initialize(configuration, channelID, acceptedItemType, null, null);
EventSubscriber eventSubscriberMock = mock(EventSubscriber.class);
when(eventSubscriberMock.getSubscribedEventTypes()).thenReturn(Collections.singleton(ItemStateEvent.TYPE));
when(eventSubscriberMock.getSubscribedEventTypes()).thenReturn(Set.of(ItemStateEvent.TYPE));
registerService(eventSubscriberMock);
if (updateEventType.equals(UpdateEventType.HANDLE_COMMAND)) {