[io] Use Java 17 features (#15485)

* instanceof matching and multiline strings
* use Map/Set/List.of instead of Collections

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2023-08-24 06:44:56 +02:00
committed by GitHub
parent 6e49c6e6ec
commit 56e7daf898
16 changed files with 50 additions and 59 deletions

View File

@@ -61,7 +61,7 @@ public class HomekitTelevisionSpeakerImpl extends AbstractHomekitAccessoryImpl {
var volumeCharacteristic = getCharacteristic(VolumeCharacteristic.class);
var volumeSelectorCharacteristic = getCharacteristic(VolumeSelectorCharacteristic.class);
if (!volumeControlTypeCharacteristic.isPresent()) {
if (volumeControlTypeCharacteristic.isEmpty()) {
VolumeControlTypeEnum type;
if (volumeCharacteristic.isPresent()) {
type = VolumeControlTypeEnum.ABSOLUTE;