Commit Graph

153 Commits (main)

Author SHA1 Message Date
Holger Friedrich b535d22d4d
Upgrade Mockito to 5.19, junit-jupiter to 5.13.4 (#4991)
* Upgrade Mockito from 4.11 to 5.19.
  Changelog: https://github.com/mockito/mockito/releases
* Upgrade junit-jupiter from 5.11.4 to 5.13.4
  Changelog: https://docs.junit.org/5.13.4/release-notes
* Add workaround to allow junit-jupiter>=5.12 with OSGI

* Activate javaagent for tests to avoid JDK warnings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-09-09 18:58:31 +02:00
Holger Friedrich ddf04e2419
Prepare for OH 5.1.0 (#4918)
* Prepare for OH 5.1.0

* Fix spotless after unleash
* Resolve itest runbundles

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-07-21 21:10:15 +02:00
openhab-bot 36e9e60f14 [unleash-maven-plugin] Preparation for next development cycle. 2025-07-21 07:17:39 +00:00
openhab-bot b1a68d0012
New Crowdin updates (#4901)
* New translations audio.properties (Portuguese)
* New translations audio.properties (Portuguese, Brazilian)
* New translations automation.properties (German)
* New translations chart.properties (German)
* New translations defaultsystemchannels.properties (German)
* New translations ephemeris.properties (Portuguese)
* New translations ephemeris.properties (Portuguese, Brazilian)
* New translations firmware.properties (Portuguese)
* New translations firmware.properties (Portuguese, Brazilian)
* New translations inbox.properties (Portuguese)
* New translations inbox.properties (Portuguese, Brazilian)
* New translations jsonstorage.properties (Portuguese)
* New translations jsonstorage.properties (Portuguese, Brazilian)
* New translations jsr223.properties (French)
* New translations jsr223.properties (German)
* New translations languagesupport.properties (Portuguese)
* New translations languagesupport.properties (Portuguese, Brazilian)
* New translations messages.properties (German)
* New translations network.properties (Portuguese)
* New translations network.properties (Portuguese, Brazilian)
* New translations persistence.properties (Portuguese, Brazilian)
* New translations scriptprofile.properties (German)
* New translations sitemap.properties (Portuguese)
* New translations sitemap.properties (Portuguese, Brazilian)
* New translations systemprofiles.properties (German)
* New translations tags.properties (French)
* New translations tags.properties (German)
* New translations units.properties (German)
* New translations units.properties (Portuguese, Brazilian)
* New translations validation.properties (German)
* New translations voice.properties (German)
2025-07-15 15:22:05 +02:00
Jacob Laursen 81d0e55137
Remove deprecated method from interface (#4884)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2025-07-06 15:16:11 +02:00
Jacob Laursen 7329ce7acf
Remove deprecated discovery methods (#4883)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2025-07-06 06:54:56 +02:00
Jacob Laursen cdfd652ce2
Refactor timestamps to `Instant` in discovery methods (#4866)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2025-07-05 16:18:50 +02:00
openhab-bot 35dc698215
New Crowdin updates (#4858)
* New translations tags.properties (Danish)
* New translations jsr223.properties (Spanish)
* New translations tags.properties (Hebrew)
* New translations automation.properties (Italian)
* New translations jsr223.properties (Hebrew)
* New translations firmware.properties (Portuguese, Brazilian)
* New translations languagesupport.properties (Portuguese)
* New translations languagesupport.properties (Portuguese, Brazilian)
* New translations audio.properties (Portuguese, Brazilian)
* New translations inbox.properties (Portuguese, Brazilian)
* New translations ephemeris.properties (Portuguese, Brazilian)
* New translations jsonstorage.properties (Portuguese, Brazilian)
* New translations network.properties (Portuguese, Brazilian)
* New translations sitemap.properties (Portuguese, Brazilian)
2025-06-21 08:56:43 +02:00
Holger Friedrich 6eb7d0c9a6
Clean up POM dependencies (#4855)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-06-18 20:23:10 +02:00
openhab-bot 575ba25023
New Crowdin updates (#4853)
* New translations firmware.properties (Portuguese)
* New translations audio.properties (Portuguese)
* New translations inbox.properties (Portuguese)
* New translations ephemeris.properties (Portuguese)
* New translations jsonstorage.properties (Portuguese)
* New translations network.properties (Portuguese)
* New translations sitemap.properties (Portuguese)
2025-06-17 22:48:02 +02:00
Yug Vajani 6e87152b90
Fixed a few non deterministic tests in the repository (#4475)
Signed-off-by: Yug Vajani <yvajani2@illinois.edu>
2025-04-02 20:01:21 +02:00
Wouter Born 6bf59605bd
Use Spotless sortpom plug-in (#4618)
This simplifies the sortpom configuration and also allows for checking and reformatting them using the spotless:check and spotless:apply Maven goals.

Signed-off-by: Wouter Born <github@maindrain.net>
2025-02-23 19:04:47 +01:00
Wouter Born f00c7700cb
Start license headers with `/*` instead of `/**` (#4544)
Prevents JavaDoc tooling issues because these tools check comments starting with `/**`.

Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-07 21:48:56 +01:00
Holger Friedrich 40d079ae80
Java 21 language features (#4535)
* Java 21 language features

* use getFirst and getLast methods
* replace new Locale by Locale.of
* replace Paths.get by Path.of
* use ThreadLocalRandom.current().nextDouble()
* add @Serial annotations

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-01-06 23:22:43 +01:00
Wouter Born 979e4a7409
Update license headers to 2025 (#4532)
Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-01 16:40:04 +01:00
Wouter Born db72021460
Update Eclipse files (#4514)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-12-24 07:02:47 +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
openhab-bot 0c93cc0456
New Crowdin updates (#4480)
* New translations addons.properties (Catalan)
* New translations addons.properties (Czech)
* New translations audio.properties (Catalan)
* New translations automation.properties (Catalan)
* New translations automation.properties (Czech)
* New translations chart.properties (Catalan)
* New translations chart.properties (Czech)
* New translations defaultsystemchannels.properties (Catalan)
* New translations defaultsystemchannels.properties (Czech)
* New translations ephemeris.properties (Catalan)
* New translations firmware.properties (Catalan)
* New translations hli.properties (Catalan)
* New translations i18n.properties (Catalan)
* New translations inbox.properties (Catalan)
* New translations jsonstorage.properties (Catalan)
* New translations jsr223.properties (Catalan)
* New translations jsr223.properties (Czech)
* New translations languagesupport.properties (Catalan)
* New translations languagesupport.properties (Portuguese)
* New translations languagesupport.properties (Portuguese, Brazilian)
* New translations lsp.properties (Catalan)
* New translations magic.properties (Catalan)
* New translations marketplace.properties (Catalan)
* New translations messages.properties (Catalan)
* New translations network.properties (Catalan)
* New translations persistence.properties (Catalan)
* New translations restauth.properties (Catalan)
* New translations scriptprofile.properties (Catalan)
* New translations scriptprofile.properties (Czech)
* New translations sitemap.properties (Catalan)
* New translations systemprofiles.properties (Catalan)
* New translations systemprofiles.properties (Czech)
* New translations systemthingstatusinfos.properties (Catalan)
* New translations tags.properties (Catalan)
* New translations units.properties (Catalan)
* New translations units.properties (Czech)
* New translations validation.properties (Catalan)
* New translations validation.properties (Czech)
* New translations voice.properties (Catalan)
* New translations voice.properties (Czech)
2024-12-08 11:45:41 +01:00
Florian Hotze c454ee2241
Fix input parameter not enabled if label/description provided for discovery services (#4393)
Fixes an issue from #4389.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-30 17:51:35 +02:00
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
lolodomo 0a5886c7e7
Fix startup of background discovery (#4323)
Apply the same logic in AbstractThingHandlerDiscoveryService as in AbstractDiscoveryService to determine if background discovery should be enabled or disabled.

Fix openhab/openhab-addons#17089

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-17 19:50:51 +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 a79a9c651b
Reduce SAT warnings (#4187)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-20 19:17:47 +02: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
Jacob Laursen fb7e030ea5
Add command completion (#4063)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-27 20:59:34 +01:00
Jacob Laursen 5b9fee7d36
[discovery] Fix warnings (#4065)
* Remove unused imports and reference explicit namespaces in Javadoc links
* Fix potential null pointer access
* Remove redundant null checks and dead code
* Suppress deprecation warnings in tests

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-27 18:14:43 +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
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 041e3b5127
Remove redundant modifiers (#4000)
Removes redundant modifiers from the code.
These modifiers redeclare the default modifiers that apply to interfaces, enums etc.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 19:29:29 +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 e958d5b46a
Replace lambdas with method references (#3972)
Method references are more readable because they refer to class names and usually result in less code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-28 09:55:31 +01:00
Wouter Born ec05a63738
Remove unnecessary boxing (#3969)
Using primitives makes the code faster and consume less memory.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-27 17:50:09 +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
Holger Friedrich 9ad2fef549
Fix javadoc warnings (#3870)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-15 09:21:07 +01: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
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
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
Holger Friedrich 769aa562a1
Code cleanup: Use Java 17 features (#3522)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-16 21:43:59 +02:00
J-N-K 8d64ecfd8d
Update license header to 2023 (#3294)
* Update license header to 2023

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-03 09:45:42 +01:00
J-N-K 98b4902c4a
Remove AccessController.doPrivileged calls (#3271)
The `AccessController` and the `SecurityManager` is deprecated for removal in Java 17. We don't make use of the `SecurityManager` anyway, so we can safely remove it.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-30 16:32:34 +01:00
Wouter Born 687688db7e
Update Eclipse .classpath files (#3250)
Also adds some missing files for recently added projects.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 14:14:35 +01:00