Commit Graph

100 Commits

Author SHA1 Message Date
Holger Friedrich
fc454883c2
Reduce SAT warnings (#4339)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-08-11 10:04:26 +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
lolodomo
3b9a97101b
[sitemap] Buttongrid as container for new Button elements (#4223)
Related to #4173

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 14:51:39 +02:00
Holger Friedrich
fa9cff6be9
GsonBuilder: Explicitly set date format (#4185)
Between Java 17 and Java 21, serialization of DateTime has changed due to
CLDR 42 which uses a narrow non-breaking space.
To ease switching JDK versions, the seralization format is explicitly
set to the Java 17 format.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-28 17:11:54 +02:00
lolodomo
619762a297
[sitemap] Extend chart periods to cover past and future (#4172)
* [sitemap] Extend chart periods to cover past and future

Closes openhab/openhab-webui#2518

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 10:51:24 +02:00
Florian Hotze
7f47d825a0
[rest] Add caching for add-on resource (#4107)
* [rest] Introduce a CACHE_CONTROL constant
* [rest] Add caching for add-ons endpoint

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 19:37:36 +01:00
joerg1985
3d83c70184
[rest] refactored the Stream2JSONInputStream to simplify the logic (#4099)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
2024-03-10 17:24:01 +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
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
18d9b531ff
Fix wrong class name logged in LocaleServiceImpl (#4034)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-12 21:37: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
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
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
Florian Hotze
f5bd7f94f3
[rest] Add no-cache directive to cached REST responses (#3970)
Fixes https://github.com/openhab/openhab-webui/issues/2102.

This forces the browser to revalidate the cache every time it is accessed to ensure the data is always fresh.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#directives.

This is approach is also suggested in the mdn web docs, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#up-to-date_contents_always.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-27 17:52:49 +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
lolodomo
f71ebfb83c
Extend support to ISO8601 format for sitemap chart period parameter (#3863)
* Extend support to ISO8601 format for sitemap chart period parameter

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-24 16:53:10 +01: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
Florian Hotze
2794c973d3
[rest] Add caching for UoM info (#3838)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 09:18:45 +02:00
J-N-K
daeb367155
Add uptime to /systeminfo REST endpoint (#3796)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-09-09 10:57:07 +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
ed392eec86
[rest] Add endpoint for UoM information (#3611)
* [rest] Add endpoint for UoM information

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-27 21:10:32 +02:00
jimtng
bc922022c3
[REST] List semantic tags (#3559)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-04-20 22:20:30 +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
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
J-N-K
3fc4d23734
Fix spotless and resolve itests (#3239)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 11:09:31 +01:00
openhab-bot
35254b3a0a [unleash-maven-plugin] Preparation for next development cycle. 2022-12-18 23:08:22 +00:00
Дилян Палаузов
e556fdf81b
Fix a/an typos (#3181)
* Typos a/an
* Fix typo generation in generateTagClasses.groovy

Signed-off-by: Wouter Born <github@maindrain.net>
2022-11-29 20:57:48 +01:00
Kai Kreuzer
61fd47c853
Apply spotless and resolver (#3018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 13:41:28 +02:00
openhab-bot
8944bdbbe4 [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 16:37:00 +00:00
J-N-K
2a3e2e5567
Reduce Mockito warnings (#2893)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-04-03 22:36:55 +02:00
J-N-K
7c3f49ab42
Fix proxy can't handle requests with forwarded host list (#2799)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-25 18:20:50 +01:00
Wouter Born
92917946d4
Add even more null annotations (#2752)
This PR adds even more missing null annotations which did not fit in #2742 as it grew too big.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-17 21:30:51 +01:00
Christoph Weitkamp
44da7a4e0e
Avoid URISyntaxException in tests (#2770)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-15 17:33:59 +01:00
Wouter Born
ad936cd83f
Add more null annotations (#2742)
* Add more null annotations
* Fix mock name

Adds null annotations to most of the tests as well as a few other classes.
Also fixes a few other SAT findings.
Fixes ~300 SAT findings in total.


Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 11:33:50 +01:00
J-N-K
719f66835e
[rest] show start level in /systeminfo (#2749)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-12 10:08:36 +01:00
Christoph Weitkamp
cabb3f7315
Update license headers to 2022 (#2671)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-07 13:16:42 +01:00
Kai Kreuzer
e3b07782b4
pom reference update from http to https (#2644)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-23 22:55:20 +01:00
Kai Kreuzer
1ebf7395d9 Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 06:59:22 +01:00
openhab-bot
5ac05c4968 [unleash-maven-plugin] Preparation for next development cycle. 2021-12-19 21:49:34 +00:00
Wouter Born
ac842063aa
ChartServlet bug fixes and improvements (#2502)
* Improve exception handling
* Add transparent themes
* Add null annotations
* Use java.time classes instead of Date and magic numbers
* Upgrade XChart to 3.1.0
* Fix buggy legend position logic:
  Reinitialize counter to 0. So it does not work on legend position counter values of previously created charts.
  Use a local variable for the position counter instead of a field. This prevents issues when creating multiple charts simultanuously.

For XChart release notes see:

https://knowm.org/open-source/xchart/xchart-change-log/

On newer XChart versions there is an issue when using customized grid lines:

https://github.com/knowm/XChart/issues/628

Fixes #1183
Related to #2501
Supersedes #2415

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-09 18:39:17 +02:00
Kai Kreuzer
5a667cc868 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:22:02 +02:00
jenkins
b8d2077805 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 15:50:02 +00:00
Wouter Born
07b95ca668
Fix SAT findings (#2256)
Fixes 65 SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:18:08 +01:00
Wouter Born
774b9d607b
Update license headers to 2021 (#2041)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-01 16:43:46 +01:00