Skip to content

Commit

Permalink
[knx] Upgrade Calimero to 2.6-rc2 (#18333)
Browse files Browse the repository at this point in the history
* [knx] Upgrade Calimero to 2.6-rc2

* Upgrade Calimero from 2.6-rc1 to 2.6-rc2, see changes
calimero-project/calimero-core@v2.6-rc1...v2.6-rc2
* Handle deprecations

Signed-off-by: Holger Friedrich <[email protected]>

* * Minor Java 21 improvements

Signed-off-by: Holger Friedrich <[email protected]>

---------

Signed-off-by: Holger Friedrich <[email protected]>
  • Loading branch information
holgerfriedrich authored Feb 27, 2025
1 parent 1e26d3b commit 4dfb47e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bundles/org.openhab.binding.knx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
@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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ private KNXNetworkLinkIP createKNXNetworkLinkIP(IpConnectionType ipConnectionTyp
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void initialize() {
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 ->
Expand Down

0 comments on commit 4dfb47e

Please sign in to comment.