* Clean up removed links in GenericItemChannelLinkProvider
* defer processing until stopConfigurationUpdate is called
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* Don't update unchanged things in .things file
There were two problems:
- The old things weren't removed, resulting in accumulation of duplicate things and comparing the new one against the old one resulting in erroneous update
- Numeric values (usually entered as integer) in a newly loaded Channel Configuration properties are stored as BigDecimal with Scale 0, but subsequent normalization changed it to scale 1. This made equals() return false when it shouldn't. This leads to calling notifyListenersAboutUpdatedElement unnecessarily.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* 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>
If the specified key is not already associated with a value (or is mapped to null), the given mapping function computes the value.
Signed-off-by: Wouter Born <github@maindrain.net>
* Apply channel config changes in .items file
Changes in channel config weren't applied because ItemChannelLink.equals() include the link configurations in the comparison. This caused the new link not being found in the set lookup, which leads to erroneously calling notifyListenersAboutAddedElement, when it should've called notifyListenersAboutUpdatedElement instead.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* Use String.join instead of Collectors.joining
String.join results in less code when joining an Iterable or Array.
Signed-off-by: Wouter Born <github@maindrain.net>
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>
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>
When things from multiple handler factories are provisioned from the same file the internal thing map was not properly updated.
Signed-off-by: Jan N. Klug <github@klug.nrw>
It was found that things from textual configuration are not properly updated if changes are only made in configuration or label of a channel. The reason is that for equality only uid and accepted item-type where checked.
Signed-off-by: Jan N. Klug <github@klug.nrw>