Commit Graph

503 Commits

Author SHA1 Message Date
lolodomo
b8b3ec9df0
Add a new optional input parameter to discovery services (#4389)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-09-29 14:08:29 +02:00
Kai Kreuzer
b3f710372d
Upgrade to JmDNS 3.5.12 (#4337)
Also-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-09-07 09:21:00 +02:00
Wouter Born
76597838c4
Fix itests on machines with lots of processors (#4349)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-08-15 22:37:21 +02:00
Wouter Born
5eedd273ba
Upgrade Jollyday to 0.30.0 (#4343)
Upgrades Jollyday from 0.28.1 to 0.30.0.

For release notes, see:

https://github.com/focus-shift/jollyday/releases/tag/v0.30.0

Signed-off-by: Wouter Born <github@maindrain.net>
2024-08-11 20:14:32 +02:00
Cody Cutrer
716045a174
Support lists for metadata properties in items files (#4330)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-05 23:19:30 +02: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
GiviMAD
2e77bbc6f9
[voice] Avoid text concatenation on speech recognition errors (#4278)
* [voice] Remove recognition error extra text and skip empty

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-06-23 23:06:19 +02:00
Holger Friedrich
ea71af9ead
Upgrade Xtext to 2.35.0 (#4264)
* Upgrade Xtext from 2.35.0.M1 to 2.35.0 final release, see release notes:
  https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/05/28/version-2-35-0
* Upgrade dependencies
  * Guava from 33.1.0 to 33.2.0
  * Lsp4j from 0.22.0 to 0.23.1

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-06-01 20:55:32 +02:00
lolodomo
a5a7eee9a8
Ephemeris: consider the default weekend dayset (#4253)
Fix openhab/openhab-addons#16812

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-27 22:34:54 +02:00
Holger Friedrich
c98c637cf8
Upgrade Jollyday to 0.28.1 (#4244)
* Upgrade Jollyday from 0.27.0 to 0.28.1.
This release includes the fixed class loader working also in OSGI
setups.
* Upgrade jackson from 2.16.0 to 2.28.1
* Upgrade threeten-extra from 1.7.2 to 1.8.0

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-24 18:50:49 +02: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
lolodomo
1fb949ba8f
Set a default presentation pattern for String/Number/Datetime items (#4175)
* Set a default presentation pattern for String/Number/Datetime items

A default state pattern was previously provided by ChannelStateDescriptionProvider only for String and Number items linked to a channel.
It is now the class DefaultStateDescriptionFragmentProvider which is responsible for providing the default state pattern for items, whether the item is linked to a channel or not.
This new class is the lowest ranked StateDescriptionFragmentProvider so that all other providers have priority in setting the state pattern.

Default pattern for string item: %s
Default pattern for datetime item or group with datetime state: %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
Default pattern for number item or group with number state: %.0f
Default pattern for number+dimension item or group with number+dimension state: %.0f %unit%

Closes #4071
Closes #3835

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-02 16:29:35 +02:00
Holger Friedrich
c316b07c47
Update plugins (#4197)
* set minimum Maven version to 3.6.3
* build-helper-maven-plugin, 3.4.0 to 3.5.0, see
  https://github.com/mojohaus/build-helper-maven-plugin/releases/tag/3.5.0
* jvnet maven-jaxb2-plugin, 0.15.2 to 0.15.3
* license-maven-plugin, 4.2 to 4.3
* maven-archetype-plugin, 3.0.1 to 3.2.1
* maven-assembly-plugin, 3.4.2 to 3.7.1, see https://github.com/apache/maven-assembly-plugin/releases
* maven-clean-plugin, 3.3.1 to 3.3.2, see https://github.com/apache/maven-clean-plugin/releases
* maven-dependency-plugin, 3.6.0/3.3.0/3.1.1 to 3.6.1, see
  https://github.com/apache/maven-dependency-plugin/releases/tag/maven-dependency-plugin-3.6.1
* maven-jar-plugin, 3.3.0 to 3.4.1, see https://github.com/apache/maven-jar-plugin/releases
* maven-javadoc-plugin, 3.6.2 to 3.6.3, see https://github.com/apache/maven-javadoc-plugin/releases
* maven-plugin-plugin, 3.11.0 to 3.12.0, see
  https://github.com/apache/maven-plugin-tools/releases/tag/maven-plugin-tools-3.12.0
* maven-shade-pluginm 3.5.2 to 3.5.3
* maven-source-plugin, 3.3.0 to 3.3.1
* maven-surefire-plugin, 3.1.2 to 3.2.5, see https://github.com/apache/maven-surefire/releases
* sortpom-maven-plugin, 3.3.0 to 3.4.1, see https://github.com/Ekryd/sortpom/releases
* spotless-maven-plugin, 2.38.0 to 2.43.0, see
  https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md
* openhab 18n-maven-plugin, 4.0.2 to 4.1.2

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-27 09:34:39 +02:00
Wouter Born
dc17296e07
Upgrade Jollyday to 0.27.0 (#4178)
Upgrades Jollyday from 0.23.2 to 0.27.0.

For release notes, see:

https://github.com/focus-shift/jollyday/releases

Signed-off-by: Wouter Born <github@maindrain.net>
2024-04-14 22:20:55 +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
joerg1985
094e4a6e04
[rest] stream json without starting a new thread (#4136)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-10 09:46:39 +01:00
Florian Hotze
81805ae6d9
[rest] Set editable for members of an item (#4118)
* [rest] Set editable for members of an item

Required by the UI.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-03 10:14:32 +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
dependabot[bot]
d994c136db
Bump com.jayway.jsonpath:json-path from 2.8.0 to 2.9.0 in /bom/test (#4059)
Bumps [com.jayway.jsonpath:json-path](https://github.com/jayway/JsonPath) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/jayway/JsonPath/releases)
- [Changelog](https://github.com/json-path/JsonPath/blob/master/changelog.md)
- [Commits](https://github.com/jayway/JsonPath/compare/json-path-2.8.0...json-path-2.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-04 10:18:12 +01:00
lolodomo
a9571228d2
Remove state description when loading an item with a removed pattern (#4068)
* Remove state description when loading an item with a removed pattern

Fix openhab/openhab-webui#2251

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Extended integration test testSquareBracketsInFormat

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

---------

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-27 18:00:56 +01:00
Wouter Born
6495f4e256
Upgrade Jollyday to 0.23.2 (#4033)
Upgrades Jollyday 0.5.10 (de.jollyday) to 0.23.2 of a more actively maintained fork (de.focus-shift).

* This adds many missing holidays.
* Also removes the workaround for the Danish Great Prayer Day introduced by #3573.

For release notes, see:

https://github.com/focus-shift/jollyday/releases

Fixes #3544

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-14 15:19:15 +01:00
Jacob Laursen
6b2182dec6
Refactor java.util.Date usages to java.time.Instant (#4026)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-07 20:51:46 +01:00
Kai Kreuzer
c4802e3fb0
Upgrade to JmDNS 3.5.9 (#4015)
For the changelog, see:

https://github.com/jmdns/jmdns/milestone/11?closed=1

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-01-05 00:07:41 +01:00
Wouter Born
c757819a15
Fix JavaDoc issues (#4004)
Fixes various issues including wrong parameter names, references, links and dangling JavaDocs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-04 00:03:48 +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
afd1d4726c
Iterate using Map entries (#4003)
* Iterate using Map entries

Iteration using Map entries is preferred because it is more efficient and helps preventing NPEs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 14:50:50 +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
Wouter Born
0e03943e48
Use String.join instead of Collectors.joining (#3973)
* 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>
2023-12-28 13:11:14 +01:00
Holger Friedrich
bada23fdb8
Minor code cleanup (#3942)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-23 12:54:29 +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
Mark Herwege
fe242f8ab9
Modified finder discovery schema to make future finders easier to create (#3924)
* change discovery method schema

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-16 11:08:09 +01:00
Andrew Fiddian-Green
cc9b70516a
AddonInfo extensions (#3865)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-05 16:49:31 +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
783c57cbb9
Use 'uid' instead of 'UID' as method parameters (#3840)
Using 'UID' is confusing as method parameter because it can be mistaken for some kind of constant while reading code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 21:39:47 +02: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