[knx] Upgrade Calimero to 2.6-rc2 (#18333)

* [knx] Upgrade Calimero to 2.6-rc2

* Upgrade Calimero from 2.6-rc1 to 2.6-rc2, see changes
https://github.com/calimero-project/calimero-core/compare/v2.6-rc1...v2.6-rc2
* Handle deprecations

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

* * Minor Java 21 improvements

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

---------

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
pull/17749/merge
Holger Friedrich 2025-02-27 22:55:34 +01:00 committed by GitHub
parent 1e26d3ba47
commit 4dfb47e9b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@
<dependency>
<groupId>com.github.calimero</groupId>
<artifactId>calimero-core</artifactId>
<version>2.6-rc1</version>
<version>2.6-rc2</version>
<scope>compile</scope>
<exclusions>
<exclusion>
@ -40,7 +40,7 @@
<dependency>
<groupId>com.github.calimero</groupId>
<artifactId>calimero-device</artifactId>
<version>2.6-rc1</version>
<version>2.6-rc2</version>
<scope>compile</scope>
<exclusions>
<exclusion>

View File

@ -63,7 +63,7 @@ public abstract class KNXChannel {
KNXChannel(List<String> gaKeys, List<Class<? extends Type>> acceptedTypes, Channel channel) {
this.gaKeys = gaKeys;
this.preferredType = acceptedTypes.get(0);
this.preferredType = acceptedTypes.getFirst();
// this is safe because we already checked the presence of the ChannelTypeUID before
this.channelType = Objects.requireNonNull(channel.getChannelTypeUID()).getId();

View File

@ -29,8 +29,8 @@ import tuwien.auto.calimero.link.medium.KNXMediumSettings;
@NonNullByDefault
public class CustomKNXNetworkLinkIP extends KNXNetworkLinkIP {
public static final int TUNNELING = KNXNetworkLinkIP.TUNNELING;
public static final int TUNNELINGV2 = KNXNetworkLinkIP.TunnelingV2;
public static final int TunnelingV1 = KNXNetworkLinkIP.TunnelingV1;
public static final int TunnelingV2 = KNXNetworkLinkIP.TunnelingV2;
public static final int ROUTING = KNXNetworkLinkIP.ROUTING;
CustomKNXNetworkLinkIP(final int serviceMode, KNXnetIPConnection conn, KNXMediumSettings settings)

View File

@ -137,9 +137,9 @@ public class IPClient extends AbstractKNXClient {
// Calimero service mode, ROUTING for both classic and secure routing
int serviceMode = CustomKNXNetworkLinkIP.ROUTING;
if (ipConnectionType == IpConnectionType.TUNNEL) {
serviceMode = CustomKNXNetworkLinkIP.TUNNELING;
serviceMode = CustomKNXNetworkLinkIP.TunnelingV1;
} else if (ipConnectionType == IpConnectionType.SECURE_TUNNEL) {
serviceMode = CustomKNXNetworkLinkIP.TUNNELINGV2;
serviceMode = CustomKNXNetworkLinkIP.TunnelingV2;
}
// creating the connection here as a workaround for

View File

@ -131,7 +131,7 @@ public class DeviceThingHandler extends BaseThingHandler implements GroupAddress
continue;
}
String dpt = inboundSpecs.get(0).getDPT(); // there can be only one DPT on number channels
String dpt = inboundSpecs.getFirst().getDPT(); // there can be only one DPT on number channels
Unit<?> unit = UnitUtils.parseUnit(DPTUnits.getUnitForDpt(dpt));
String dimension = unit == null ? null : UnitUtils.getDimensionName(unit);
String expectedItemType = dimension == null ? "Number" : "Number:" + dimension; // unknown dimension ->