Java 17 features (N-S) (#15565)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex - instanceof matching and multiline strings Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
package org.openhab.binding.solaredge.internal;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -111,5 +110,5 @@ public class SolarEdgeBindingConstants {
|
||||
public static final String STATUS_NO_METER_CONFIGURED = "@text/status.no.meter.configured";
|
||||
public static final String STATUS_WAITING_FOR_LOGIN = "@text/status.waiting.for.login";
|
||||
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_GENERIC);
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_GENERIC);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,6 @@ public class SolarEdgeGenericHandler extends BaseThingHandler implements SolarEd
|
||||
public @Nullable Channel getChannel(String groupId, String channelId) {
|
||||
ThingUID thingUID = this.getThing().getUID();
|
||||
ChannelGroupUID channelGroupUID = new ChannelGroupUID(thingUID, groupId);
|
||||
Channel channel = getThing().getChannel(new ChannelUID(channelGroupUID, channelId));
|
||||
return channel;
|
||||
return getThing().getChannel(new ChannelUID(channelGroupUID, channelId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,6 @@ public class AggregateDataResponseTransformerPublicApi extends AbstractDataRespo
|
||||
*/
|
||||
private final void fillAggregateData(AggregatePeriod period, String unit, MeterTelemetries meter, String channelId,
|
||||
Map<Channel, State> valueMap) {
|
||||
|
||||
String group = convertPeriodToGroup(period);
|
||||
List<MeterTelemetry> values = meter.values;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user