Skip to content

Commit

Permalink
Adapt to core change, xtext dependencies
Browse files Browse the repository at this point in the history
* gson 2.11.0
* guava 3.33.1
* ecj 3.39.0
* Fix newly introduced compilation and test issues in bindings

Signed-off-by: Holger Friedrich <[email protected]>
  • Loading branch information
holgerfriedrich committed Dec 23, 2024
1 parent 88a6966 commit a34620d
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,7 @@ public static List<Measure> parseJson(Gson gson, String stringResponse) {
}

if (measures != null) {
List<@Nullable Measure> nullableMeasuresWithoutNulls = measures.stream().filter(Objects::nonNull).toList();
List<Measure> measuresWithoutNulls = new ArrayList<>(nullableMeasuresWithoutNulls.size());
for (@Nullable
Measure m : nullableMeasuresWithoutNulls) {
if (m != null) {
measuresWithoutNulls.add(m);
}
}

return measuresWithoutNulls;
return measures.stream().filter(Objects::nonNull).toList();
}

return Collections.emptyList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void sendRequestInvalidSyntaxInResponse()
ExecutionException e = assertThrows(ExecutionException.class,
() -> httpClient.sendRequest(request, SubscribeResult.class, sr -> false, null));
assertEquals(
"Received invalid content in response, expected type org.openhab.binding.boschshc.internal.devices.bridge.dto.SubscribeResult: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 44 path $.@type",
"Received invalid content in response, expected type org.openhab.binding.boschshc.internal.devices.bridge.dto.SubscribeResult: com.google.gson.stream.MalformedJsonException: Unterminated string at line 1 column 44 path $.@type\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json",
e.getMessage());
}
}
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.mqtt.homeassistant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.3.0-jre</version>
<version>33.3.1-jre</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,9 @@ private void updateThermostatState(NhcThermostat2 thermostat, List<NhcProperty>
Optional<Integer> ambientTemperatureProperty = deviceProperties.stream().map(p -> p.ambientTemperature)
.map(s -> (!((s == null) || s.isEmpty())) ? Math.round(Float.parseFloat(s) * 10) : null)
.filter(Objects::nonNull).findFirst();
Optional<@Nullable String> demandProperty = deviceProperties.stream().map(p -> p.demand)
.filter(Objects::nonNull).findFirst();
Optional<@Nullable String> operationModeProperty = deviceProperties.stream().map(p -> p.operationMode)
Optional<String> demandProperty = deviceProperties.stream().map(p -> p.demand).filter(Objects::nonNull)
.findFirst();
Optional<String> operationModeProperty = deviceProperties.stream().map(p -> p.operationMode)
.filter(Objects::nonNull).findFirst();

String modeString = deviceProperties.stream().map(p -> p.program).filter(Objects::nonNull).findFirst()
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.transform.jinja/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.3.0-jre</version>
<version>33.3.1-jre</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Fragment-Host: org.openhab.automation.groovyscripting
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Fragment-Host: org.openhab.automation.jsscriptingnashorn
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.astro.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Fragment-Host: org.openhab.binding.astro
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-jupiter-params;version='[5.10.0,5.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.avmfritz.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Fragment-Host: org.openhab.binding.avmfritz
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.feed.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Fragment-Host: org.openhab.binding.feed
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.hue.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Fragment-Host: org.openhab.binding.hue
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.max.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Fragment-Host: org.openhab.binding.max
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.mielecloud.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Fragment-Host: org.openhab.binding.mielecloud
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.modbus.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Fragment-Host: org.openhab.binding.modbus
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-jupiter-params;version='[5.10.0,5.10.1)',\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Import-Package: \
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
com.hivemq.client.mqtt;version='[1.3.3,1.3.4)',\
io.reactivex.rxjava2.rxjava;version='[2.2.21,2.2.22)',\
reactive-streams;version='[1.0.4,1.0.5)',\
Expand Down Expand Up @@ -120,7 +120,7 @@ Import-Package: \
com.fasterxml.jackson.core.jackson-core;version='[2.17.2,2.17.3)',\
com.fasterxml.jackson.core.jackson-databind;version='[2.17.2,2.17.3)',\
com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;version='[2.17.2,2.17.3)',\
com.google.guava;version='[33.3.0,33.3.1)',\
com.google.guava;version='[33.3.1,33.3.2)',\
com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\
com.google.re2j.re2j;version='[1.2.0,1.2.1)',\
com.hubspot.jinjava.jinjava;version='[2.7.4,2.7.5)',\
Expand All @@ -129,7 +129,4 @@ Import-Package: \
org.apache.commons.lang3;version='[3.17.0,3.17.1)',\
org.yaml.snakeyaml;version='[2.2.0,2.2.1)',\
com.fasterxml.jackson.datatype.jackson-datatype-jdk8;version='[2.17.2,2.17.3)',\
com.google.guava;version='[33.3.0,33.3.1)',\
com.hubspot.immutables.immutables-exceptions;version='[1.9.0,1.9.1)',\
biz.aQute.tester.junit-platform;version='[7.1.0,7.1.1)',\
org.osgi.service.cm;version='[1.6.0,1.6.1)'
com.hubspot.immutables.immutables-exceptions;version='[1.9.0,1.9.1)'
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.mqtt.homie.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Import-Package: \
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
com.hivemq.client.mqtt;version='[1.3.3,1.3.4)',\
io.reactivex.rxjava2.rxjava;version='[2.2.21,2.2.22)',\
reactive-streams;version='[1.0.4,1.0.5)',\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Import-Package: \
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
com.hivemq.client.mqtt;version='[1.3.3,1.3.4)',\
io.reactivex.rxjava2.rxjava;version='[2.2.21,2.2.22)',\
reactive-streams;version='[1.0.4,1.0.5)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.ntp.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Fragment-Host: org.openhab.binding.ntp
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.systeminfo.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Fragment-Host: org.openhab.binding.systeminfo
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.tradfri.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Fragment-Host: org.openhab.binding.tradfri
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.binding.wemo.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Fragment-Host: org.openhab.binding.wemo
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
2 changes: 1 addition & 1 deletion itests/org.openhab.persistence.mapdb.tests/itest.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Fragment-Host: org.openhab.persistence.mapdb
org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\
org.osgi.service.event;version='[1.4.1,1.4.2)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
com.google.gson;version='[2.10.1,2.10.2)',\
com.google.gson;version='[2.11.0,2.11.1)',\
junit-jupiter-api;version='[5.10.0,5.10.1)',\
junit-jupiter-engine;version='[5.10.0,5.10.1)',\
junit-platform-commons;version='[1.10.0,1.10.1)',\
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<netty.version>4.1.104.Final</netty.version>
<okhttp3.version>4.12.0</okhttp3.version>
<okio.version>3.9.0</okio.version>
<gson.version>2.9.1</gson.version>
<gson.version>2.11.0</gson.version>
<kotlin.version>1.9.23</kotlin.version>
<sat.version>0.16.0</sat.version>
<slf4j.version>2.0.12</slf4j.version>
Expand Down Expand Up @@ -325,7 +325,7 @@ Import-Package: \\
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.36.0</version>
<version>3.39.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down

0 comments on commit a34620d

Please sign in to comment.