Commit Graph

227 Commits

Author SHA1 Message Date
Wouter Born
db72021460
Update Eclipse files (#4514)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-12-24 07:02:47 +01:00
Wouter Born
9f0b8d48fe
Revert LinkedTransferQueue high CPU usage workaround (#4499)
Reverts the workaround #3756 that was introduced for JDK-8301341 because it is fixed in OpenJDK 21

Signed-off-by: Wouter Born <github@maindrain.net>
2024-12-17 00:46:30 +01:00
Holger Friedrich
8d837f9823
Prepare for OH 5.0.0 (#4496)
* Prepare for OH 5.0.0

* Switch to 5.0.0-SNAPSHOT
* Fix spotless after unleash
* resolve itest runbundles
* Fix linux-specific pom

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-12-15 18:49:23 +01:00
openhab-bot
0f2e56f39d [unleash-maven-plugin] Preparation for next development cycle. 2024-12-15 11:41:19 +00:00
Wouter Born
fa29f52a99
Update bnd to 7.1.0 (#4464)
For release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-7.1.0

Signed-off-by: Wouter Born <github@maindrain.net>
2024-11-30 21:31:35 +01:00
Holger Friedrich
660102e3f9
Upgrade XStream to 1.4.21 (#4457)
* Upgrade XStream from 1.4.20 to 1.4.21, fixes CVE-2024-47072.
  See changelog at https://x-stream.github.io/changes.html#1.4.21

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-11-18 23:34:06 +01:00
J-N-K
6f0add09ba
Add missing system profile types and UIDs (#4320)
* Add missing system profile types and UIDs

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-07-16 22:52:25 +02:00
Kai Kreuzer
21e605d212
Apply spotless after release, resolve bundles (#4301)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-07-07 23:22:27 +02:00
openhab-bot
07e23eac3c [unleash-maven-plugin] Preparation for next development cycle. 2024-07-07 16:05:56 +00:00
Holger Friedrich
873bb53cbc
Upgrade Karaf from 4.4.5 to 4.4.6 (#4181)
* Upgrade Karaf from 4.4.5 to 4.4.6

* Sync runtime dependencies with Karaf 4.4.6, most notably:
  * Jetty 9.4.54.v20240208, addresses CVE-2024-22201
  * Pax Logging 2.2.7
  * Pax Web 8.0.27
  * ASM 9.7
  * BouncyCastle 1.77
* Upgrade xtext to 2.35.0.M1
* Resolve itest runbundles

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-20 17:42:04 +02:00
Gaël L'hopital
6887db3b89
Adding UV Index system channel (#3878)
* Adding UV Index system channel

Signed-off-by: clinique <gael@lhopital.org>
2024-05-20 12:09:52 +02:00
Holger Friedrich
3850599163
Upgrade to Karaf 4.4.5 and Xtext 2.34 (#4133)
* Upgrade to Karaf 4.4.5 and Xtext 2.34

Upgrade Karaf from 4.4.4 to 4.4.5:
* Sync runtime dependencies with Karaf 4.4.5, most notably:
  * Jetty 9.4.53.v20231009
  * JNA 5.14.0
  * Pax Logging 2.2.6
  * Pax Web 8.0.24
  * ASM 9.6
* Resolve itest runbundles

Upgrade Xtext from 2.32 to 2.34
* Sync depencencies, most notably:
  * Guava 33.0.0
  * classgraph 4.8.165 changing provider to io.github.classgraph
* Migrate old Xtext generator xtext.generator to xtext.xtext.generator
  as xtext.generator has been removed from Xtext, affecting
  org.openhab.core.model.lazygen

* resolve runbundles
* Remove org.openhab.core.model.lazygen
  No longer in use since 2017, see eclipse-archived/smarthome#4122.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-03-17 09:41:15 +01:00
J-N-K
a27d241290
Fix itests not running (#4091)
Why do unresolved tests result in "No error" instead of "Failed"?

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-02-13 22:00:46 +01:00
Wouter Born
85056d9d7b
Some more code cleanup (#4021)
This cleanup includes:

* Use enhanced for loops
* Use text blocks
* Use Objects.equals
* Fix some typos
* Remove redundant variable initialization
* Remove redundant null checks with instanceof
* Remove redundant thrown Exceptions
* Remove redundant empty String concatenation

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-04 11:17:55 +01:00
Wouter Born
2babea4c9a
Update license headers to 2024 (#4011)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:20:34 +01:00
Wouter Born
6fc7700ea6
Use protected modifier with constructor of abstract classes (#4010)
Abstract classes should not have public constructors.
Constructors of abstract classes can only be called in constructors of their subclasses.
So there is no point in making them public.
The protected modifier should be enough.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 16:17:14 +01:00
Wouter Born
106c8b2270
Remove unnecessary semicolons (#4009)
This helps with stopping the proliferation of unnecessary semicolons.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 13:47:23 +01:00
Wouter Born
26a958cd4d
Use static inner classes (#4002)
A static inner class does not keep an implicit reference to its enclosing instance.
This prevents a common cause of memory leaks and uses less memory per instance of the class.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 12:35:26 +01:00
Wouter Born
10c0cf8211
Simplify assertions (#3996)
* Simplify assertions

Using the appropriate assertion methods results in less and easier to read code as well as better error messages when assertions fail.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 12:24:50 +01:00
Wouter Born
58a106d36d
Use diamond operator (#4001)
Often the type can be inferred so the diamond operator can be used to simplify the code.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 08:22:43 +01:00
Wouter Born
dc5f50db63
Fix assertEquals order (#3995)
The first parameter should be the expected value and the second parameter the actual value.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 22:27:53 +01:00
Wouter Born
89b67adbd7
Use isEmpty instead of 0 comparisons (#3999)
`isEmpty()` expresses the intent more clearly and is therefore preferred.
Counting the number of elements can also be an expensive operation e.g. when using linked lists.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 18:47:36 +01:00
J-N-K
a5316f920e
Refactor ThingHandlerService to an OSGi component prototype (#3957)
Also-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
Signed-off-by: J-N-K <github@klug.nrw>
2024-01-02 13:09:51 +01:00
Wouter Born
ba5647b871
More code cleanups (#3975)
While cleaning up the code I found a some more code to cleanup:

* Remove unnecessary boxing
* Use `contains(..)` instead of `indexOf(..) != -1`
* Use `assertInstanceOf` in tests
* Make expensive trace logging conditional
* Remove redundant constructor
* Replace `collect(Collectors.toUnmodifiableList())` with `toList()`
* Replace `filter(..).count() == 0L` with `noneMatch(..)`
* Replace `filter(..).count() > 0` with `anyMatch(..)`

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-28 13:15:50 +01:00
Holger Friedrich
839ba1ab4c
Apply spotless after release, resolve bundles (#3953)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:14:28 +01:00
openhab-bot
3b279587b1 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 11:48:43 +00:00
Wouter Born
81f14c9df1
Upgrade logback-classic to 1.3.14 (#3935) 2023-12-19 23:26:22 +01:00
J-N-K
cdbca4dd0a
Allow sending TimeSeries for items (#3597)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-11-07 20:08:41 -08:00
Wouter Born
e8e1c9fe73
Simplify code that creates List, Map and Set objects (#3836)
Simplifies the code by using List.of, List.copyOf etc. where possible which results in less code and imports.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 18:00:00 +02:00
Wouter Born
09b3160a55
Simplify code using Stream.toList (#3831)
Stream.toList was introduced in Java 16 and creates an unmodifiable List so it can be used to simplify code whenever the List is not expected to be modified.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 09:20:08 +02:00
Wouter Born
eff85c6470
Upgrade JUnit to 5.10.0 (#3832)
Upgrades JUnit from 5.9.2 to 5.10.0.

For release notes, see:

https://junit.org/junit5/docs/5.10.0/release-notes/#release-notes-5.10.0

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-07 20:34:47 +02:00
Wouter Born
fb3d4e805d
Update bnd to 7.0.0 (#3828)
For release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-7.0.0

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-06 18:45:20 +02:00
Wouter Born
fffa968263
Upgrade Xtext/Xtend to 2.32.0, LSP4J to 0.21.0 (#3817)
Upgrades Xtext and its dependencies to:

* Xtext/Xtend 2.32.0
* LSP4J 0.21.0
* GSON 2.10.1
* Guava 32.1.2
* Guice 7.0.0

For release notes, see:

https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2023/08/27/version-2-32-0

Fixes #3321

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-01 22:04:27 +02:00
Wouter Born
d4a433a4ce
Upgrade to Karaf 4.4.4 (#3814)
* Sync runtime dependencies with Karaf 4.4.4, most notably:
  * Jetty 9.4.52.v20230823
  * JNA 5.13.0
  * SLF4J 2.0.6
  * Pax Logging 2.2.3
  * Pax Web 8.0.22
* Resolve itest runbundles
* Use new Pax Web features to simplify dependency management
* Add specs features because Pax Web now depends on "asm"

Signed-off-by: Wouter Born <github@maindrain.net>
2023-09-29 20:23:31 +02:00
J-N-K
af4fce1e4f
Fix CommunicationManager command handling (#3714)
* Fix CommunicationManager

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-09-13 22:27:12 +02:00
Wouter Born
e1d2b88398
Update directory-watcher to 0.18.0 (#3790)
Updates the directory-watcher from 0.17.1 to 0.18.0.

This version has some bug fixes/improvements, see:

https://github.com/gmethvin/directory-watcher/compare/v0.17.1...v0.18.0

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-30 22:51:25 +02:00
Wouter Born
c39d15ade6
Cleanup code (#3787)
This code cleanup fixes various warnings in Eclipse.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-30 22:50:17 +02:00
Wouter Born
5daf4ff076
Fix SAT and null analysis issues (#3781)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-27 11:15:15 +02:00
J-N-K
04eb32185c
Bump UoM libraries to 2.2 (#3758)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-08-18 21:38:43 +02:00
Wouter Born
aef57edd73
Use workaround to fix high CPU usage by LinkedTransferQueue (#3756)
This is a workaround for JDK-8301341 by using the Java 11 LinkedTransferQueue with the QueueingThreadPoolExecutor in the Core and jUPnP.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-14 10:37:20 +02:00
Wouter Born
3b91692be1
Fix build (#3726)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-07-24 09:02:01 +02:00
Kai Kreuzer
5692232e2b Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:11:37 +02:00
openhab-bot
fd93f0a766 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 17:14:35 +00:00
J-N-K
5a00bfdc41
Align system-channel-types for electricity (#3707)
* Align system-channel-types for electricity

These are only used by one binding at the moment and it's very inconsistent to have power, voltage and current with the "electric" prefix and energy with "electrical".

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-07-18 09:05:42 +02:00
Wouter Born
3396ff7758
Use Eclipse formatter 4.25 with Spotless (#3710)
Fixes #3515

Signed-off-by: Wouter Born <github@maindrain.net>
2023-07-18 09:03:16 +02:00
J-N-K
78e66745ab
Add support for things with generic channels (#3355)
* Add support for generic channels

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-25 16:22:55 +02:00
J-N-K
9ef076dc6a
[uom] Add unit metadata for NumberItem (#3481)
* Add defaultUnit metadata for NumberItem

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-09 22:42:25 +02:00
J-N-K
8e1a2cfd0a
Add an AbstractStorageBasedTypeProvider (#3407)
* Add an AbstractDynamicTypeProvider

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-07 21:51:10 +02:00
J-N-K
960cf0c179
Improve thing updates (#3576)
* Improve thing updates

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-07 20:46:42 +02:00
Holger Friedrich
33233982b3
Code cleanup: Use Java 17 features (#3580)
* Code cleanup: Use Java 17 features

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-30 18:37:48 +02:00