From a2868bb0dc13f58d5d02d1d37c5ed9ce30ef15ba Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Tue, 9 Jan 2024 23:46:15 +0100 Subject: [PATCH] Use diamond operator and remove redundant type arguments (#16249) Signed-off-by: Wouter Born --- .../internal/template/PWMRuleTemplate.java | 4 +- .../template/PWMTemplateProvider.java | 2 +- .../internal/protocol/ADMessage.java | 2 +- .../pcap/PcapNetworkInterfaceWrapper.java | 2 +- .../discovery/SmartHomeDevicesDiscovery.java | 2 +- .../smarthome/HandlerTemperatureSensor.java | 4 +- .../HandlerThermostatController.java | 12 ++--- ...tHomeDeviceStateGroupUpdateCalculator.java | 2 +- .../binding/amplipi/internal/model/Group.java | 2 +- .../internal/model/ValidationError.java | 2 +- .../androidtv/internal/AndroidTVHandler.java | 2 +- .../binding/astro/internal/calc/SunCalc.java | 2 +- .../internal/AutomowerBindingConstants.java | 2 +- .../api/automowerconnect/dto/MowerData.java | 2 +- .../internal/things/AutomowerHandler.java | 8 ++- .../AwattarNonConsecutiveBestPriceResult.java | 4 +- .../handler/AwattarBestpriceHandler.java | 2 +- .../internal/AirthingsWaveMiniHandler.java | 9 ++-- .../internal/AirthingsWavePlusHandler.java | 21 +++----- .../commands/GetIndoorOutoorTemperatures.java | 4 +- .../commands/GetOperationHoursCommand.java | 6 +-- .../model/commands/GetSetpointCommand.java | 4 +- .../daikinmadoka/handler/DummyThing.java | 6 +-- .../generic/internal/BluetoothUnit.java | 43 +++++++-------- .../command/hygrometer/GetBatteryCommand.java | 2 +- .../hygrometer/GetOrSetHumWarningCommand.java | 6 +-- .../hygrometer/GetOrSetTemWarningCommand.java | 6 +-- .../radoneye/internal/RadoneyeHandler.java | 3 +- .../BluetoothScanNotification.java | 2 +- .../internal/handler/BondDeviceHandler.java | 2 +- .../internal/handler/BoschAccountHandler.java | 2 +- .../devices/AbstractPowerSwitchHandler.java | 8 +-- .../devices/twinguard/TwinguardHandler.java | 9 ++-- .../AbstractPowerSwitchHandlerTest.java | 4 +- .../devices/bridge/LongPollingTest.java | 8 +-- .../ClimateControlHandlerTest.java | 4 +- .../thermostat/ThermostatHandlerTest.java | 4 +- .../twinguard/TwinguardHandlerTest.java | 9 ++-- .../WallThermostatHandlerTest.java | 7 +-- .../internal/api/SmartherApi.java | 6 +-- .../internal/api/dto/Measure.java | 10 ++-- .../internal/handler/ThingHandlerPanel.java | 4 +- .../binding/cbus/CBusBindingConstants.java | 4 +- .../cbus/internal/CBusHandlerFactory.java | 4 +- .../discovery/CBusGroupDiscovery.java | 2 +- .../comfoair/internal/ComfoAirCommand.java | 4 +- .../internal/dto/CoronaStatsCases.java | 4 +- .../dali/internal/protocol/DaliFrame.java | 2 +- .../deutschebahn/internal/EventAttribute.java | 2 +- .../timetable/TimetableStubHttpCallable.java | 4 +- .../ZoneTemperatureControlHandler.java | 5 +- .../dominoswiss/internal/EGateHandler.java | 4 +- .../internal/handler/HotWaterHandler.java | 6 +-- .../internal/handler/RoomHandler.java | 6 +-- .../device/p1telegram/P1TelegramParser.java | 2 +- .../command/AbstractWriteCommand.java | 2 +- .../circuit/SetDynamicCircuitCurrents.java | 2 +- .../circuit/SetMaxCircuitCurrents.java | 2 +- .../circuit/SetOfflineMaxCircuitCurrents.java | 2 +- .../internal/EcobeeBindingConstants.java | 4 +- .../ecobee/internal/action/EcobeeActions.java | 10 ++-- .../handler/EcobeeAccountBridgeHandler.java | 3 +- .../ecotouch/internal/EcoTouchConnector.java | 4 +- .../ecotouch/internal/EcoTouchHandler.java | 4 +- .../ecotouch/internal/EcoTouchTags.java | 2 +- .../internal/EcovacsBindingConstants.java | 53 +++++++++---------- .../handler/ElectroluxAirHandler.java | 26 +++------ .../internal/stick/TransmitterStick.java | 2 +- .../internal/CacheManager.java | 4 +- .../action/EnergiDataServiceActions.java | 2 +- .../config/DatahubPriceConfiguration.java | 5 +- .../binding/enocean/internal/eep/EEPType.java | 6 ++- .../internal/eep/generic/GenericEEP.java | 35 ++++++------ .../handler/EvohomeHeatingZoneHandler.java | 8 ++- .../internal/FlicButtonBindingConstants.java | 2 +- .../internal/FlicButtonHandlerFactory.java | 2 +- .../internal/client/FMIResponse.java | 2 +- .../AbstractFMIResponseParsingTest.java | 2 +- .../folderwatcher/internal/api/S3Actions.java | 4 +- .../internal/api/auth/AWS4SignerBase.java | 6 +-- .../StrictEnumTypeAdapterFactory.java | 2 +- .../internal/api/rest/HomeManager.java | 2 +- .../internal/FroniusHandlerFactory.java | 3 +- .../GeneracMobileLinkAccountHandler.java | 2 +- .../GeneracMobileLinkGeneratorHandler.java | 13 ++--- .../handler/GroheOndusSenseGuardHandler.java | 2 +- .../internal/things/GroupePSAHandler.java | 2 +- .../internal/HaasSohnpelletstoveHandler.java | 6 +-- .../handler/HDPowerViewHubHandler.java | 8 +-- .../internal/gen3/Generation3DtoTest.java | 4 +- .../HeliosVentilationBindingConstants.java | 2 +- .../internal/HeliosVentilationHandler.java | 2 +- .../server/BinRpcNetworkService.java | 2 +- .../communicator/server/XmlRpcServer.java | 2 +- .../test/util/RpcClientMockImpl.java | 2 +- .../hue/internal/api/dto/clip1/Scene.java | 2 +- .../hue/internal/connection/Clip2Bridge.java | 2 +- .../api/local/dto/LocalScheduleResponse.java | 4 +- .../api/local/dto/StatusScheduleResponse.java | 4 +- .../handler/HydrawiseAccountHandler.java | 2 +- .../handler/HydrawiseControllerHandler.java | 10 ++-- .../logic/BiweeklyPresentableCalendar.java | 10 ++-- .../icalendar/internal/logic/Event.java | 2 +- .../openhab/binding/icloud/TestICloud.java | 6 +-- .../insteon/internal/InsteonBinding.java | 2 +- .../internal/device/InsteonDevice.java | 2 +- .../binding/insteon/internal/message/Msg.java | 2 +- .../internal/handler/IntesisBoxHandler.java | 6 +-- .../ipcamera/internal/AmcrestHandler.java | 2 +- .../ipcamera/internal/DoorBirdHandler.java | 2 +- .../binding/ipcamera/internal/Ffmpeg.java | 2 +- .../ipcamera/internal/HttpOnlyHandler.java | 2 +- .../ipcamera/internal/InstarHandler.java | 2 +- .../internal/IpCameraBindingConstants.java | 5 +- .../handler/IpCameraGroupHandler.java | 2 +- .../internal/handler/IpCameraHandler.java | 2 +- .../internal/onvif/OnvifDiscovery.java | 2 +- .../internal/servlet/OpenStreams.java | 2 +- .../internal/servlet/StreamOutput.java | 2 +- .../internal/IpObserverHandler.java | 4 +- .../irobot/internal/dto/MQTTProtocol.java | 2 +- .../binding/ism8/server/KnxNetFrame.java | 4 +- .../openhab/binding/ism8/server/Server.java | 2 +- .../internal/ec3k/Ec3kSensorHandler.java | 5 +- .../LaCrosseTemperatureSensorHandler.java | 7 ++- .../internal/lacrosse/LgwSensorHandler.java | 2 +- .../internal/lacrosse/Tx22SensorHandler.java | 2 +- .../internal/pca301/Pca301SensorHandler.java | 2 +- .../internal/revolt/RevoltSensorHandler.java | 2 +- .../KaleidescapeBindingConstants.java | 9 ++-- .../KaleidescapeDiscoveryService.java | 4 +- .../internal/handler/KaleidescapeHandler.java | 2 +- .../handler/KaleidescapeMessageHandler.java | 16 +++--- .../internal/handler/KeContactHandler.java | 47 +++++++--------- .../knx/internal/client/SerialClient.java | 2 +- .../binding/kvv/internal/DepartureResult.java | 2 +- .../kvv/internal/KVVBridgeHandler.java | 2 +- .../binding/kvv/internal/KVVStopHandler.java | 2 +- .../HttpAuthenticationFilter.java | 2 +- .../internal/api/filter/LoggingFilter.java | 6 +-- .../internal/api/cloud/dto/Icons.java | 2 +- .../CustomizedTypeAdapterFactory.java | 2 +- .../imported/RuntimeTypeAdapterFactory.java | 14 ++--- .../internal/api/local/dto/Failure.java | 2 +- .../internal/api/local/dto/ActionTest.java | 2 +- .../api/local/dto/ApplicationTest.java | 4 +- .../api/local/dto/UpdateActionTest.java | 2 +- .../internal/api/local/dto/WidgetTest.java | 2 +- .../lgwebos/internal/BaseChannelHandler.java | 2 +- .../lgwebos/internal/LauncherApplication.java | 4 +- .../lgwebos/internal/TVControlChannel.java | 4 +- .../lgwebos/internal/VolumeControlMute.java | 2 +- .../lgwebos/internal/VolumeControlVolume.java | 2 +- .../internal/action/LGWebOSActions.java | 4 +- .../internal/handler/LGWebOSHandler.java | 21 ++++---- .../handler/LGWebOSTVKeyboardInput.java | 2 +- .../internal/handler/LGWebOSTVSocket.java | 8 +-- .../loxone/internal/controls/LxControl.java | 2 +- .../binding/loxone/internal/types/LxUuid.java | 2 +- .../internal/discovery/project/Area.java | 6 +-- .../internal/discovery/project/Device.java | 2 +- .../discovery/project/DeviceGroup.java | 2 +- .../internal/discovery/project/Project.java | 6 +-- .../lutron/internal/net/TelnetSession.java | 2 +- .../protocol/leap/LeapMessageParser.java | 2 +- .../internal/ChannelUpdaterJob.java | 2 +- .../internal/MagentaTVDeviceManager.java | 2 +- .../magentatv/internal/MagentaTVGsonDTO.java | 2 +- .../internal/handler/MagentaTVHandler.java | 2 +- .../mcd/internal/util/SensorEventDef.java | 3 +- .../internal/handler/MeaterHandler.java | 10 ++-- .../internal/handler/VehicleHandler.java | 12 ++--- .../internal/server/CallbackServer.java | 4 +- .../mercedesme/internal/server/Utils.java | 2 +- .../mercedesme/internal/utils/Mapper.java | 2 +- .../openhab/binding/mercedesme/ImageTest.java | 4 +- .../openhab/binding/mercedesme/JsonTest.java | 14 ++--- .../miele/internal/TimeStabilizer.java | 2 +- .../webservice/DeviceStateDispatcherTest.java | 8 +-- .../webservice/RequestFactoryImplTest.java | 2 +- .../webservice/api/ActionsStateTest.java | 2 +- .../api/json/DeviceCollectionTest.java | 4 +- .../miio/internal/cloud/CloudConnector.java | 6 +-- .../miio/internal/cloud/CloudUtil.java | 4 +- .../miio/internal/cloud/MiCloudConnector.java | 4 +- .../internal/handler/MiIoVacuumHandler.java | 2 +- .../miio/internal/robot/RRMapDraw.java | 2 +- .../miio/internal/robot/RRMapFileParser.java | 6 +-- .../binding/miio/internal/ReadmeHelper.java | 2 +- .../server/MinecraftSocketHandler.java | 4 +- .../internal/server/ServerConnection.java | 2 +- .../internal/handler/E3DCThingHandler.java | 2 +- .../handler/E3DCHandlerStateTest.java | 4 +- .../internal/HeliosEasyControlsActions.java | 8 +-- .../internal/HeliosEasyControlsHandler.java | 4 +- .../modbus/studer/internal/StuderHandler.java | 2 +- .../SunspecDiscoveryParticipant.java | 2 +- .../profiles/ModbusGainOffsetProfile.java | 2 +- .../internal/protocol/MPDResponseParser.java | 2 +- .../mqtt/generic/utils/FutureCollector.java | 9 ++-- ...hannelConfigurationTypeAdapterFactory.java | 4 +- .../internal/discovery/VehicleDiscovery.java | 2 +- .../backend/JsonStringDeserializer.java | 2 +- .../mybmw/internal/dto/StatusWrapper.java | 2 +- .../mybmw/internal/handler/auth/AuthTest.java | 16 +++--- .../internal/api/MycroftConnection.java | 2 +- .../handler/NanoleafControllerHandler.java | 2 +- .../jersey/filter/LoggingFilter.java | 4 +- .../StrictEnumTypeAdapterFactory.java | 2 +- .../connection/SimulatorConnector.java | 2 +- .../nibeheatpump/internal/models/F1X45.java | 2 +- .../nibeheatpump/internal/models/F1X55.java | 2 +- .../nibeheatpump/internal/models/F470.java | 2 +- .../nibeheatpump/internal/models/F750.java | 2 +- .../nibeheatpump/internal/models/SMO40.java | 2 +- .../message/ModbusDataReadOutMessageTest.java | 12 ++--- .../internal/model/ComponentRegister.java | 2 +- .../internal/model/WeekProfileRegister.java | 2 +- .../nobohub/internal/model/ZoneRegister.java | 2 +- .../binding/nuvo/internal/dto/NuvoMenu.java | 6 +-- .../nuvo/internal/handler/NuvoHandler.java | 26 ++++----- .../internal/ThermostatHandler.java | 20 ++++--- .../models/groups/GroupContentModel.java | 2 +- .../groups/GroupContentResponseModel.java | 2 +- .../internal/models/groups/ScheduleModel.java | 2 +- .../discovery/ObjectPropertyRequest.java | 5 +- .../internal/handler/RouteHandler.java | 2 +- .../api/OpenSprinklerHttpApiV100.java | 4 +- .../handler/OpenSprinklerDeviceHandler.java | 7 +-- .../handler/OpenWebNetAlarmHandler.java | 2 +- .../handler/OpenWebNetEnergyHandler.java | 10 ++-- .../handler/OpenWebNetScenarioHandler.java | 2 +- .../handlers/ParadoxPanelHandler.java | 9 ++-- .../internal/handler/PlexServerHandler.java | 2 +- .../api/model/PlugwiseHAController.java | 4 +- .../internal/api/model/dto/Location.java | 2 +- .../handler/PlugwiseHAApplianceHandler.java | 34 ++++++------ .../handler/PlugwiseHAZoneHandler.java | 4 +- .../pulseaudio/internal/PulseaudioClient.java | 4 +- .../handler/QolsysIQPanelHandler.java | 2 +- .../handler/QolsysIQPartitionHandler.java | 4 +- .../internal/handler/QolsysIQZoneHandler.java | 2 +- .../handler/RadioThermostatHandler.java | 5 +- .../internal/handler/RenaultHandler.java | 22 ++++---- .../discovery/ResolVBusBridgeDiscovery.java | 2 +- .../providers/ResolChannelTypeProvider.java | 2 +- .../internal/RFXComBindingConstants.java | 2 +- .../messages/RFXComMessageFactoryImpl.java | 2 +- .../binding/roku/internal/dto/Apps.java | 2 +- .../binding/roku/internal/dto/TvChannels.java | 2 +- .../rio/source/RioSourceProtocol.java | 27 +++++----- .../internal/service/ServiceFactory.java | 2 +- .../senechome/internal/SenecHomeHandler.java | 2 +- .../internal/ConditionHandlerTest.java | 12 ++--- .../internal/NoiseHandlerTest.java | 8 +-- .../internal/PMHandlerTest.java | 14 ++--- .../internal/mock/ThingMock.java | 6 +-- .../internal/api1/Shelly1CoapHandler.java | 2 +- .../discovery/ShellyBluDiscoveryService.java | 3 +- .../internal/manager/ShellyManagerCache.java | 2 +- .../internal/manager/ShellyManagerPage.java | 2 +- .../binding/siemensrds/test/TestRdsData.java | 5 +- .../smartmeter/connectors/ConnectorBase.java | 2 +- .../binding/smartmeter/TestMeterReading.java | 3 +- .../internal/SmartthingsServlet.java | 6 +-- .../handler/SmartthingsBridgeHandler.java | 2 +- .../handler/SmartthingsThingHandler.java | 4 +- .../java/org/smslib/MessageReader.java | 2 +- .../handler/SMSModemBridgeHandler.java | 2 +- .../discovery/SncfDiscoveryService.java | 2 +- .../SolarmaxConnectorFindCommands.java | 4 +- .../internal/SolaxLocalAccessHandler.java | 2 +- .../handler/SomfyTahomaBridgeHandler.java | 2 +- .../sonnen/internal/SonnenHandler.java | 28 +++++----- .../internal/dto/SurePetcareBaseObject.java | 2 +- .../handler/SurePetcareDeviceHandler.java | 8 ++- .../handler/SurePetcarePetHandler.java | 10 ++-- .../internal/TouchWandAlarmSensorHandler.java | 7 +-- .../internal/TouchWandRestClient.java | 2 +- .../internal/TouchWandThermostatHandler.java | 4 +- .../TouchWandAlarmSensorCurrentStatus.java | 6 +-- .../model/TradfriAirPurifierData.java | 7 ++- .../internal/UpnpControlHandlerFactory.java | 4 +- .../internal/handler/UpnpHandler.java | 12 ++--- .../internal/handler/UpnpRendererHandler.java | 8 +-- .../internal/handler/UpnpServerHandler.java | 6 +-- .../internal/queue/UpnpEntryQueue.java | 2 +- .../UpnpRenderingControlConfiguration.java | 2 +- .../internal/util/UpnpXMLParser.java | 4 +- .../handler/UpnpRendererHandlerTest.java | 2 +- .../vdr/internal/svdrp/SVDRPTimerList.java | 4 +- .../internal/VelbusPacketInputStream.java | 2 +- .../VelbusSensorWithAlarmClockHandler.java | 2 +- .../velux/internal/VeluxRSBindingConfig.java | 4 +- .../handler/VenstarThermostatHandler.java | 13 +++-- .../ventaair/internal/VentaThingHandler.java | 10 ++-- .../internal/VerisureHandlerFactory.java | 2 +- .../VerisureClimateDeviceThingHandler.java | 9 ++-- .../VerisureMiceDetectionThingHandler.java | 13 ++--- .../vizio/internal/dto/applist/VizioApps.java | 2 +- .../vizio/internal/dto/audio/Audio.java | 4 +- .../internal/dto/input/CurrentInput.java | 4 +- .../internal/dto/inputlist/InputList.java | 4 +- .../vizio/internal/dto/power/PowerMode.java | 2 +- .../vizio/internal/handler/VizioHandler.java | 2 +- .../discovery/WarmupDiscoveryService.java | 2 +- .../binding/wemo/internal/WemoPowerBank.java | 2 +- .../binding/wemo/internal/WemoUtil.java | 2 +- .../handler/WemoBaseThingHandler.java | 4 +- .../internal/handler/WemoInsightHandler.java | 2 +- .../internal/handler/WemoMotionHandler.java | 2 +- .../internal/handler/WemoSwitchHandler.java | 2 +- .../internal/WlanThermoHandlerFactory.java | 2 +- .../internal/api/nano/dto/data/Pitmaster.java | 4 +- .../internal/api/nano/dto/settings/Ext.java | 2 +- .../internal/api/nano/dto/settings/Notes.java | 2 +- .../api/nano/dto/settings/Settings.java | 8 +-- .../internal/handlers/WLedBridgeHandler.java | 2 +- .../WolfSmartsetBindingConstants.java | 5 +- .../internal/api/WolfSmartsetApi.java | 4 +- .../internal/handler/ZmMonitorHandler.java | 4 +- .../internal/HomekitChangeListener.java | 2 +- .../accessories/HomekitAccessoryFactory.java | 4 +- .../HomekitCharacteristicFactory.java | 2 +- .../accessories/HomekitValveImpl.java | 2 +- .../jersey/filter/LoggingFilter.java | 4 +- .../internal/AbstractDynamoDBItem.java | 4 +- .../internal/DynamoDBPersistenceService.java | 10 ++-- .../internal/DynamoDBTableNameResolver.java | 2 +- .../internal/TableCreatingPutItem.java | 2 +- .../persistence/jdbc/internal/JdbcMapper.java | 2 +- .../jdbc/internal/NamingStrategyTest.java | 16 +++--- .../internal/MapDbPersistenceService.java | 2 +- .../voice/mimic/internal/MimicTTSService.java | 2 +- .../AbstractMieleThingHandlerTest.java | 2 +- .../modbus/tests/ModbusDataHandlerTest.java | 5 +- .../tests/ModbusPollerThingHandlerTest.java | 16 +++--- 337 files changed, 777 insertions(+), 912 deletions(-) diff --git a/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMRuleTemplate.java b/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMRuleTemplate.java index 84268492164..bb6f7380451 100644 --- a/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMRuleTemplate.java +++ b/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMRuleTemplate.java @@ -46,10 +46,10 @@ public class PWMRuleTemplate extends RuleTemplate { final List triggers = List.of(ModuleBuilder.createTrigger().withId(triggerId) .withTypeUID(PWMTriggerType.UID).withLabel("PWM Trigger").build()); - final Map actionInputs = new HashMap(); + final Map actionInputs = new HashMap<>(); actionInputs.put(PWMConstants.INPUT, triggerId + "." + PWMConstants.OUTPUT); - Set tags = new HashSet(); + Set tags = new HashSet<>(); tags.add("PWM"); return new PWMRuleTemplate(tags, triggers, Collections.emptyList(), Collections.emptyList(), diff --git a/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMTemplateProvider.java b/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMTemplateProvider.java index cdd49202121..d357c31f8f7 100644 --- a/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMTemplateProvider.java +++ b/bundles/org.openhab.automation.pwm/src/main/java/org/openhab/automation/pwm/internal/template/PWMTemplateProvider.java @@ -33,7 +33,7 @@ import org.osgi.service.component.annotations.Component; @Component @NonNullByDefault public class PWMTemplateProvider implements RuleTemplateProvider { - private final Map providedRuleTemplates = new HashMap(); + private final Map providedRuleTemplates = new HashMap<>(); public PWMTemplateProvider() { providedRuleTemplates.put(PWMRuleTemplate.UID, PWMRuleTemplate.initialize()); diff --git a/bundles/org.openhab.binding.alarmdecoder/src/main/java/org/openhab/binding/alarmdecoder/internal/protocol/ADMessage.java b/bundles/org.openhab.binding.alarmdecoder/src/main/java/org/openhab/binding/alarmdecoder/internal/protocol/ADMessage.java index b540eb003a4..3ef4727f2ce 100644 --- a/bundles/org.openhab.binding.alarmdecoder/src/main/java/org/openhab/binding/alarmdecoder/internal/protocol/ADMessage.java +++ b/bundles/org.openhab.binding.alarmdecoder/src/main/java/org/openhab/binding/alarmdecoder/internal/protocol/ADMessage.java @@ -44,7 +44,7 @@ public abstract class ADMessage { /** Utility routine to split an AD message into its component parts */ protected static List splitMsg(String msg) { - List l = new ArrayList(); + List l = new ArrayList<>(); Matcher regexMatcher = SPLIT_REGEX.matcher(msg); while (regexMatcher.find()) { l.add(regexMatcher.group()); diff --git a/bundles/org.openhab.binding.amazondashbutton/src/main/java/org/openhab/binding/amazondashbutton/internal/pcap/PcapNetworkInterfaceWrapper.java b/bundles/org.openhab.binding.amazondashbutton/src/main/java/org/openhab/binding/amazondashbutton/internal/pcap/PcapNetworkInterfaceWrapper.java index 053666463bd..6bd7a7783c3 100644 --- a/bundles/org.openhab.binding.amazondashbutton/src/main/java/org/openhab/binding/amazondashbutton/internal/pcap/PcapNetworkInterfaceWrapper.java +++ b/bundles/org.openhab.binding.amazondashbutton/src/main/java/org/openhab/binding/amazondashbutton/internal/pcap/PcapNetworkInterfaceWrapper.java @@ -40,7 +40,7 @@ public class PcapNetworkInterfaceWrapper { /** * Use this Guava function in order to create a {@link PcapNetworkInterfaceWrapper} instance. */ - public static final Function TRANSFORMER = new Function() { + public static final Function TRANSFORMER = new Function<>() { @Override public PcapNetworkInterfaceWrapper apply(PcapNetworkInterface pcapNetworkInterface) { diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/discovery/SmartHomeDevicesDiscovery.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/discovery/SmartHomeDevicesDiscovery.java index 6718a47e43c..d1f677ef921 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/discovery/SmartHomeDevicesDiscovery.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/discovery/SmartHomeDevicesDiscovery.java @@ -60,7 +60,7 @@ public class SmartHomeDevicesDiscovery extends AbstractDiscoveryService { } public void activate() { - activate(new Hashtable()); + activate(new Hashtable<>()); } @Override diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java index 6a8064b2860..88ff4c3ed38 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java @@ -83,9 +83,9 @@ public class HandlerTemperatureSensor extends HandlerBase { float temperature = value.get("value").getAsFloat(); String scale = value.get("scale").getAsString(); if ("CELSIUS".equals(scale)) { - temperatureValue = new QuantityType(temperature, SIUnits.CELSIUS); + temperatureValue = new QuantityType<>(temperature, SIUnits.CELSIUS); } else { - temperatureValue = new QuantityType(temperature, ImperialUnits.FAHRENHEIT); + temperatureValue = new QuantityType<>(temperature, ImperialUnits.FAHRENHEIT); } } } diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerThermostatController.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerThermostatController.java index ca65d50fec2..476b7fdd267 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerThermostatController.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerThermostatController.java @@ -101,9 +101,9 @@ public class HandlerThermostatController extends HandlerBase { float temperature = value.get("value").getAsFloat(); String scale = value.get("scale").getAsString().toUpperCase(); if ("CELSIUS".equals(scale)) { - temperatureValue = new QuantityType(temperature, SIUnits.CELSIUS); + temperatureValue = new QuantityType<>(temperature, SIUnits.CELSIUS); } else { - temperatureValue = new QuantityType(temperature, ImperialUnits.FAHRENHEIT); + temperatureValue = new QuantityType<>(temperature, ImperialUnits.FAHRENHEIT); } } updateState(TARGET_SETPOINT.channelId, temperatureValue == null ? UnDefType.UNDEF : temperatureValue); @@ -121,9 +121,9 @@ public class HandlerThermostatController extends HandlerBase { float temperature = value.get("value").getAsFloat(); String scale = value.get("scale").getAsString().toUpperCase(); if ("CELSIUS".equals(scale)) { - temperatureValue = new QuantityType(temperature, SIUnits.CELSIUS); + temperatureValue = new QuantityType<>(temperature, SIUnits.CELSIUS); } else { - temperatureValue = new QuantityType(temperature, ImperialUnits.FAHRENHEIT); + temperatureValue = new QuantityType<>(temperature, ImperialUnits.FAHRENHEIT); } } updateState(UPPER_SETPOINT.channelId, temperatureValue == null ? UnDefType.UNDEF : temperatureValue); @@ -135,9 +135,9 @@ public class HandlerThermostatController extends HandlerBase { float temperature = value.get("value").getAsFloat(); String scale = value.get("scale").getAsString().toUpperCase(); if ("CELSIUS".equals(scale)) { - temperatureValue = new QuantityType(temperature, SIUnits.CELSIUS); + temperatureValue = new QuantityType<>(temperature, SIUnits.CELSIUS); } else { - temperatureValue = new QuantityType(temperature, ImperialUnits.FAHRENHEIT); + temperatureValue = new QuantityType<>(temperature, ImperialUnits.FAHRENHEIT); } } updateState(LOWER_SETPOINT.channelId, temperatureValue == null ? UnDefType.UNDEF : temperatureValue); diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/SmartHomeDeviceStateGroupUpdateCalculator.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/SmartHomeDeviceStateGroupUpdateCalculator.java index 6a3632ca92a..5674a7c1ad0 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/SmartHomeDeviceStateGroupUpdateCalculator.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/SmartHomeDeviceStateGroupUpdateCalculator.java @@ -106,7 +106,7 @@ public class SmartHomeDeviceStateGroupUpdateCalculator { } } // check which groups needs an update - Set groupsToUpdate = new HashSet(); + Set groupsToUpdate = new HashSet<>(); for (UpdateGroup group : updateGroups.values()) { long millisecondsSinceLastUpdate = updateTimeStamp.getTime() - group.lastUpdated.getTime(); if (syncAllGroups || millisecondsSinceLastUpdate >= group.intervalInSeconds * 1000) { diff --git a/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/Group.java b/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/Group.java index 4be24caf977..605d42a578b 100644 --- a/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/Group.java +++ b/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/Group.java @@ -49,7 +49,7 @@ public class Group { /** * Set of zones belonging to a group **/ - private Set zones = new LinkedHashSet(); + private Set zones = new LinkedHashSet<>(); @Schema /** diff --git a/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/ValidationError.java b/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/ValidationError.java index 1d297f0a528..a3cd9f2a447 100644 --- a/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/ValidationError.java +++ b/bundles/org.openhab.binding.amplipi/src/gen/java/org/openhab/binding/amplipi/internal/model/ValidationError.java @@ -20,7 +20,7 @@ import io.swagger.v3.oas.annotations.media.Schema; public class ValidationError { @Schema(required = true) - private List loc = new ArrayList(); + private List loc = new ArrayList<>(); @Schema(required = true) private String msg; diff --git a/bundles/org.openhab.binding.androidtv/src/main/java/org/openhab/binding/androidtv/internal/AndroidTVHandler.java b/bundles/org.openhab.binding.androidtv/src/main/java/org/openhab/binding/androidtv/internal/AndroidTVHandler.java index f060214bfe4..a1d0fe7247b 100644 --- a/bundles/org.openhab.binding.androidtv/src/main/java/org/openhab/binding/androidtv/internal/AndroidTVHandler.java +++ b/bundles/org.openhab.binding.androidtv/src/main/java/org/openhab/binding/androidtv/internal/AndroidTVHandler.java @@ -99,7 +99,7 @@ public class AndroidTVHandler extends BaseThingHandler { public void updateCDP(String channelName, Map cdpMap) { logger.trace("{} - Updating CDP for {}", this.thingID, channelName); - List commandOptions = new ArrayList(); + List commandOptions = new ArrayList<>(); cdpMap.forEach((key, value) -> commandOptions.add(new CommandOption(key, value))); logger.trace("{} - CDP List: {}", this.thingID, commandOptions); commandDescriptionProvider.setCommandOptions(new ChannelUID(getThing().getUID(), channelName), commandOptions); diff --git a/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/SunCalc.java b/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/SunCalc.java index de3f16e61b9..f00fc4fb1d6 100644 --- a/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/SunCalc.java +++ b/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/SunCalc.java @@ -346,7 +346,7 @@ public class SunCalc { public static Map sortByValue(Map map) { List> list = new ArrayList<>(map.entrySet()); - Collections.sort(list, new Comparator>() { + Collections.sort(list, new Comparator<>() { @Override public int compare(Entry p1, Entry p2) { Range p1Range = p1.getValue(); diff --git a/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/AutomowerBindingConstants.java b/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/AutomowerBindingConstants.java index e3077131303..aa140b49e42 100644 --- a/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/AutomowerBindingConstants.java +++ b/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/AutomowerBindingConstants.java @@ -54,7 +54,7 @@ public class AutomowerBindingConstants { // introduce // this in a future release public static final String LAST_POSITION = GROUP_POSITIONS + "last-position"; - public static final ArrayList CHANNEL_POSITIONS = new ArrayList( + public static final ArrayList CHANNEL_POSITIONS = new ArrayList<>( List.of(GROUP_POSITIONS + "position01", GROUP_POSITIONS + "position02", GROUP_POSITIONS + "position03", GROUP_POSITIONS + "position04", GROUP_POSITIONS + "position05", GROUP_POSITIONS + "position06", GROUP_POSITIONS + "position07", GROUP_POSITIONS + "position08", GROUP_POSITIONS + "position09", diff --git a/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/rest/api/automowerconnect/dto/MowerData.java b/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/rest/api/automowerconnect/dto/MowerData.java index f088f8c9fab..3f861c33fee 100644 --- a/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/rest/api/automowerconnect/dto/MowerData.java +++ b/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/rest/api/automowerconnect/dto/MowerData.java @@ -24,7 +24,7 @@ public class MowerData { private Calendar calendar; private Planner planner; private Metadata metadata; - private ArrayList positions = new ArrayList(); + private ArrayList positions = new ArrayList<>(); public System getSystem() { return system; diff --git a/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/things/AutomowerHandler.java b/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/things/AutomowerHandler.java index 52797be3f00..b0a87a253cd 100644 --- a/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/things/AutomowerHandler.java +++ b/bundles/org.openhab.binding.automower/src/main/java/org/openhab/binding/automower/internal/things/AutomowerHandler.java @@ -25,8 +25,6 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import javax.measure.quantity.Dimensionless; - import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.automower.internal.AutomowerBindingConstants; @@ -80,7 +78,7 @@ public class AutomowerHandler extends BaseThingHandler { private final Logger logger = LoggerFactory.getLogger(AutomowerHandler.class); private final TimeZoneProvider timeZoneProvider; - private AtomicReference automowerId = new AtomicReference(NO_ID); + private AtomicReference automowerId = new AtomicReference<>(NO_ID); private long lastQueryTimeMs = 0L; private @Nullable ScheduledFuture automowerPollingJob; @@ -290,8 +288,8 @@ public class AutomowerHandler extends BaseThingHandler { updateState(CHANNEL_STATUS_LAST_UPDATE, new DateTimeType(toZonedDateTime(mower.getAttributes().getMetadata().getStatusTimestamp()))); - updateState(CHANNEL_STATUS_BATTERY, new QuantityType( - mower.getAttributes().getBattery().getBatteryPercent(), Units.PERCENT)); + updateState(CHANNEL_STATUS_BATTERY, + new QuantityType<>(mower.getAttributes().getBattery().getBatteryPercent(), Units.PERCENT)); updateState(CHANNEL_STATUS_ERROR_CODE, new DecimalType(mower.getAttributes().getMower().getErrorCode())); diff --git a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java index 7de1b7d0ca4..9b9b768a7b6 100644 --- a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java +++ b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java @@ -37,7 +37,7 @@ public class AwattarNonConsecutiveBestPriceResult extends AwattarBestPriceResult public AwattarNonConsecutiveBestPriceResult(int size, ZoneId zoneId) { super(); this.zoneId = zoneId; - members = new ArrayList(); + members = new ArrayList<>(); } public void addMember(AwattarPrice member) { @@ -59,7 +59,7 @@ public class AwattarNonConsecutiveBestPriceResult extends AwattarBestPriceResult private void sort() { if (!sorted) { - members.sort(new Comparator() { + members.sort(new Comparator<>() { @Override public int compare(AwattarPrice o1, AwattarPrice o2) { return Long.compare(o1.getStartTimestamp(), o2.getStartTimestamp()); diff --git a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/handler/AwattarBestpriceHandler.java b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/handler/AwattarBestpriceHandler.java index 41b7b8a02e4..091d0c4c7c3 100644 --- a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/handler/AwattarBestpriceHandler.java +++ b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/handler/AwattarBestpriceHandler.java @@ -153,7 +153,7 @@ public class AwattarBestpriceHandler extends BaseThingHandler { AwattarBestPriceResult result; if (config.consecutive) { - ArrayList range = new ArrayList(config.rangeDuration); + ArrayList range = new ArrayList<>(config.rangeDuration); range.addAll(getPriceRange(bridgeHandler, timerange, (o1, o2) -> Long.compare(o1.getStartTimestamp(), o2.getStartTimestamp()))); AwattarConsecutiveBestPriceResult res = new AwattarConsecutiveBestPriceResult( diff --git a/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWaveMiniHandler.java b/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWaveMiniHandler.java index f9452433581..7731720731d 100644 --- a/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWaveMiniHandler.java +++ b/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWaveMiniHandler.java @@ -17,9 +17,6 @@ import static org.openhab.binding.bluetooth.airthings.internal.AirthingsBindingC import java.util.Map; import java.util.UUID; -import javax.measure.quantity.Dimensionless; -import javax.measure.quantity.Temperature; - import org.eclipse.jdt.annotation.NonNullByDefault; import org.openhab.core.library.types.QuantityType; import org.openhab.core.library.unit.SIUnits; @@ -55,15 +52,15 @@ public class AirthingsWaveMiniHandler extends AbstractAirthingsHandler { logger.debug("Parsed data: {}", data); Number humidity = data.get(AirthingsDataParser.HUMIDITY); if (humidity != null) { - updateState(CHANNEL_ID_HUMIDITY, new QuantityType(humidity, Units.PERCENT)); + updateState(CHANNEL_ID_HUMIDITY, new QuantityType<>(humidity, Units.PERCENT)); } Number temperature = data.get(AirthingsDataParser.TEMPERATURE); if (temperature != null) { - updateState(CHANNEL_ID_TEMPERATURE, new QuantityType(temperature, SIUnits.CELSIUS)); + updateState(CHANNEL_ID_TEMPERATURE, new QuantityType<>(temperature, SIUnits.CELSIUS)); } Number tvoc = data.get(AirthingsDataParser.TVOC); if (tvoc != null) { - updateState(CHANNEL_ID_TVOC, new QuantityType(tvoc, Units.PARTS_PER_BILLION)); + updateState(CHANNEL_ID_TVOC, new QuantityType<>(tvoc, Units.PARTS_PER_BILLION)); } } catch (AirthingsParserException e) { logger.error("Failed to parse data received from Airthings sensor: {}", e.getMessage()); diff --git a/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWavePlusHandler.java b/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWavePlusHandler.java index 0d02b34c9da..fba99fdc307 100644 --- a/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWavePlusHandler.java +++ b/bundles/org.openhab.binding.bluetooth.airthings/src/main/java/org/openhab/binding/bluetooth/airthings/internal/AirthingsWavePlusHandler.java @@ -17,12 +17,7 @@ import static org.openhab.binding.bluetooth.airthings.internal.AirthingsBindingC import java.util.Map; import java.util.UUID; -import javax.measure.quantity.Dimensionless; -import javax.measure.quantity.Pressure; -import javax.measure.quantity.Temperature; - import org.eclipse.jdt.annotation.NonNullByDefault; -import org.openhab.core.library.dimension.RadiationSpecificActivity; import org.openhab.core.library.types.QuantityType; import org.openhab.core.library.unit.SIUnits; import org.openhab.core.library.unit.Units; @@ -57,33 +52,33 @@ public class AirthingsWavePlusHandler extends AbstractAirthingsHandler { logger.debug("Parsed data: {}", data); Number humidity = data.get(AirthingsDataParser.HUMIDITY); if (humidity != null) { - updateState(CHANNEL_ID_HUMIDITY, new QuantityType(humidity, Units.PERCENT)); + updateState(CHANNEL_ID_HUMIDITY, new QuantityType<>(humidity, Units.PERCENT)); } Number temperature = data.get(AirthingsDataParser.TEMPERATURE); if (temperature != null) { - updateState(CHANNEL_ID_TEMPERATURE, new QuantityType(temperature, SIUnits.CELSIUS)); + updateState(CHANNEL_ID_TEMPERATURE, new QuantityType<>(temperature, SIUnits.CELSIUS)); } Number pressure = data.get(AirthingsDataParser.PRESSURE); if (pressure != null) { - updateState(CHANNEL_ID_PRESSURE, new QuantityType(pressure, Units.MILLIBAR)); + updateState(CHANNEL_ID_PRESSURE, new QuantityType<>(pressure, Units.MILLIBAR)); } Number co2 = data.get(AirthingsDataParser.CO2); if (co2 != null) { - updateState(CHANNEL_ID_CO2, new QuantityType(co2, Units.PARTS_PER_MILLION)); + updateState(CHANNEL_ID_CO2, new QuantityType<>(co2, Units.PARTS_PER_MILLION)); } Number tvoc = data.get(AirthingsDataParser.TVOC); if (tvoc != null) { - updateState(CHANNEL_ID_TVOC, new QuantityType(tvoc, Units.PARTS_PER_BILLION)); + updateState(CHANNEL_ID_TVOC, new QuantityType<>(tvoc, Units.PARTS_PER_BILLION)); } Number radonShortTermAvg = data.get(AirthingsDataParser.RADON_SHORT_TERM_AVG); if (radonShortTermAvg != null) { - updateState(CHANNEL_ID_RADON_ST_AVG, new QuantityType(radonShortTermAvg, - Units.BECQUEREL_PER_CUBIC_METRE)); + updateState(CHANNEL_ID_RADON_ST_AVG, + new QuantityType<>(radonShortTermAvg, Units.BECQUEREL_PER_CUBIC_METRE)); } Number radonLongTermAvg = data.get(AirthingsDataParser.RADON_LONG_TERM_AVG); if (radonLongTermAvg != null) { updateState(CHANNEL_ID_RADON_LT_AVG, - new QuantityType(radonLongTermAvg, Units.BECQUEREL_PER_CUBIC_METRE)); + new QuantityType<>(radonLongTermAvg, Units.BECQUEREL_PER_CUBIC_METRE)); } } catch (AirthingsParserException e) { logger.error("Failed to parse data received from Airthings sensor: {}", e.getMessage()); diff --git a/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetIndoorOutoorTemperatures.java b/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetIndoorOutoorTemperatures.java index 33f14f44620..13dd834ad59 100644 --- a/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetIndoorOutoorTemperatures.java +++ b/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetIndoorOutoorTemperatures.java @@ -74,10 +74,10 @@ public class GetIndoorOutoorTemperatures extends BRC1HCommand { } } - indoorTemperature = new QuantityType(iIndoorTemperature, SIUnits.CELSIUS); + indoorTemperature = new QuantityType<>(iIndoorTemperature, SIUnits.CELSIUS); if (iOutdoorTemperature != null) { - outdoorTemperature = new QuantityType(iOutdoorTemperature, SIUnits.CELSIUS); + outdoorTemperature = new QuantityType<>(iOutdoorTemperature, SIUnits.CELSIUS); } logger.debug("Indoor Temp: {}", indoorTemperature); diff --git a/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetOperationHoursCommand.java b/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetOperationHoursCommand.java index 51e59c77112..def5161ac79 100644 --- a/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetOperationHoursCommand.java +++ b/bundles/org.openhab.binding.bluetooth.daikinmadoka/src/main/java/org/openhab/binding/bluetooth/daikinmadoka/internal/model/commands/GetOperationHoursCommand.java @@ -79,9 +79,9 @@ public class GetOperationHoursCommand extends BRC1HCommand { Integer iIndoorFanHours = (int) (fanHours.getComputedValue(ByteOrder.LITTLE_ENDIAN)); Integer iIndoorPowerHours = (int) (powerHours.getComputedValue(ByteOrder.LITTLE_ENDIAN)); - this.indoorOperationHours = new QuantityType