Commit Graph

304 Commits

Author SHA1 Message Date
openhab-bot
22c39fb54d
New Crowdin updates (#2869)
* New translations addons.properties (Dutch)
* New translations addons.properties (Finnish)
* New translations addons.properties (German)
* New translations addons.properties (Hebrew)
* New translations addons.properties (Italian)
* New translations addons.properties (Polish)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Finnish)
* New translations marketplace.properties (German)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Italian)
* New translations SystemThingStatusInfos.properties (Bulgarian)
* New translations units.properties (Catalan)
2022-03-25 18:44:31 +01:00
Wouter Born
b5e0ccfa6a
Add missing default translations for add-ons/marketplace configuration options (#2868)
This makes it possible to use Crowdin for translating the new configuration options introduced in #2811.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-23 17:45:23 +01:00
openhab-bot
7e13f7f4bd
New Crowdin updates (#2863)
* New translations addons.properties (Chinese Simplified)
* New translations addons.properties (Czech)
* New translations addons.properties (Dutch)
* New translations addons.properties (Finnish)
* New translations addons.properties (French)
* New translations addons.properties (German)
* New translations addons.properties (Greek)
* New translations addons.properties (Hebrew)
* New translations addons.properties (Hungarian)
* New translations addons.properties (Italian)
* New translations addons.properties (Polish)
* New translations addons.properties (Portuguese, Brazilian)
* New translations addons.properties (Russian)
* New translations addons.properties (Spanish)
* New translations addons.properties (Ukrainian)
* New translations i18n.properties (Danish)
* New translations magic.properties (Dutch)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Hungarian)
* New translations marketplace.properties (Italian)
* New translations network.properties (Danish)
* New translations SystemThingStatusInfos.properties (Dutch)
* New translations units.properties (Danish)
* New translations validation.properties (Danish)
* New translations validation.properties (Dutch)
* New translations voice.properties (Dutch)
2022-03-22 21:27:45 +01:00
J-N-K
41abd57161
Increase allowed deviation in PeriodicSchedulerImplTest (#2867)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-22 20:46:50 +01:00
J-N-K
4577562f08
[addonservices] Add version filtering (#2811)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-20 18:43:07 +01:00
J-N-K
3d17049d52
Improve PeridodicSchedulerImplTest (#2856)
* Improve PeridodicSchedulerImplTest

The old implementation truncated timestamps to 1/10 s. Under some circumstances this could result in a failed tests:

offset = 201 -> truncatedOffset = 2
200ms delay expected, adjustment calculation results in an actual delay of 198ms
time = 399 -> truncatedTime = 3

expected: truncatedOffset + expected => 2 + 2 = 4
actual: truncatedTime = 3

The new implementation allows for an error of +/- 10ms which is far more than needed.

* increase tolerance
* fix consecutive executions build up errors

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-19 21:07:08 +01:00
Wouter Born
ba4e73ccf4
Run org.openhab.core tests in forks to reduce build time (#2837)
This saves about 1 minute when building this bundle.
Most bundles depend on org.openhab.core so cores would stay idle until this bundle is build in a parallel builds.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-13 12:11:11 +01:00
Wouter Born
e6ddeccd78
Add more null annotations to XML processing classes (#2775)
This adds null annotations to many XML processing classes and a few others.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-10 19:57:31 +01:00
J-N-K
c7aec15290
Fix missing STARTLEVEL_COMPLETE ReadyMarker (#2755)
Since no requirements are defined for `STARTLEVEL_COMPLETE´ no `ReadyMarker` was added to the map of `ReadyMarker`s.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-03-09 22:05:30 +01:00
J-N-K
f79d85da87
Re-introduce removed DecimalType ctors to maintain compatibility (#2803)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-26 13:30:56 +01:00
Wouter Born
9ff7ad43b9
Add more null annotations to automation bundles (#2763)
* Add more null annotations to automation bundles. This adds null annotations to many classes in the automation bundles and a few dimension classes.
* Further cleanup AutomationCommandExport
* Remove null from RuleStatusInfo JavaDocs. This should be clear from how the class is now annotated.
* Validate deserialized RuleStatusInfo
* Allow TriggerHandlerCallback to be triggered without providing a context

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-25 16:40:02 +01:00
J-N-K
44f7b00c45
[rest] Add ability to change loggers and expose package names of addons (#2772)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-25 16:34:37 +01:00
kippAndMost
9e721dca36
[openhab.core] DecimalType-ctor with Number argument (#2596)
The expectation is, that when a `DecimalType` was constructed with a
`float` value, the precision of its `doubleValue()`, `floatValue()`,
`toBigDecimal()` and `toString()` is preserved. But there are `float`
values like `4.2f` or `37.1f` that cannot directly converted to `double`
without precision loss.

This commit replaces all the numerical constructors of `DecimalType`
with a single constructor with a `Number` argument, so that all `float`
values can be used without precision loss.

NOTE: There is some special handling needed for `QuantityType` and
`HSBType` because these types has a special none convential `toString`
implementation.

Signed-off-by: Ringo Frischmann <ringo.frischmann@kiwigrid.com>
2022-02-24 21:27:45 +01:00
J-N-K
2565b5cbe4
[expiry] extend ExpiryManager to allow ignoring state updates (#2739)
* [expiry] extend ExpiryManager to allow ignoring state updates

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-24 21:21:23 +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
Wouter Born
fb6ef20cd9
Move Java only tests from org.openhab.core.tests to org.openhab.core (#2768)
These tests only require Java and not OSGi.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-15 16:34:14 +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
James Melville
b594d0a8b7
Add new Imperial Pressure unit psi (#2758)
Signed-off-by: James Melville <jamesmelville@gmail.com>
2022-02-13 10:02:37 +01:00
James Melville
92679aa6fd
Add bearingTo method for PointType (#2757)
Signed-off-by: James Melville <jamesmelville@gmail.com>
2022-02-13 10:01:21 +01:00
J-N-K
c0b033b95c
Fix WatchQueueReader cancelling jobs too early (#2745)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-12 10:10:23 +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
J-N-K
ea6f21f74d
allow multiple listeners for same directory in WatchService (#2724)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-07 10:14:41 +01:00
Cody Cutrer
57ed7ef5a7
Include full exception when WatchQueueReader thread dies (#2538)
See #2537

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-01-18 13:46: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
Christoph Weitkamp
33a553fa4d
[core] Added nullness annotations and suppress warning for 'AuthenticationException' (#2659)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-02 11:33:16 +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
Christoph Weitkamp
2d79990d53
Use static BigDecimal values (#2620)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-21 22:13:22 +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
openhab-bot
de7b176dc4
New Crowdin updates (#2609)
* New translations addons.properties (Italian)
* New translations brokerConnectionInstance.properties (Italian)
* New translations i18n.properties (Italian)
* New translations inbox.properties (Italian)
* New translations marketplace.properties (German)
* New translations marketplace.properties (Hebrew)
* New translations marketplace.properties (Hungarian)
* New translations marketplace.properties (Italian)
* New translations restauth.properties (Italian)
* New translations tags.properties (Italian)
* New translations tags.properties (Polish)
* New translations validation.properties (Italian)
2021-12-15 22:14:37 +01:00
Christoph Weitkamp
8f23e2f04a
Added nullness annotations to Addon related classes (#2605)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-12 10:07:05 +01:00
Wouter Born
044aad891e
Remove unnecessary executable permissions (#2591)
These files are marked as executable for no good reason at all.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-05 19:58:23 +01:00
Christoph Weitkamp
07ee8e6ffc
Added nullness anotations to ChannelEventTriggerHandler (#2586)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-03 14:32:05 +01:00
Jan Vybíral
a32844358b
Prevent shutdown of shared thread pool (#760) (#2531)
Fixes #760

Signed-off-by: Jan Vybíral <jan.vybiral1@gmail.com>
2021-11-15 21:13:31 +01:00
Yannick Schaus
d4f62ed024
Add compilation errors & SAT GitHub annotations (#2543)
Signed-off-by: Yannick Schaus <github@schaus.net>
2021-11-13 22:13:28 +01:00
lolodomo
998ce26ef5
[core] Added basic exception classes which supports internationalization (#2549)
* New exception class that incorporates support for internationalization
* Add ConnectionException, CommunicationException and ConfigurationException

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-11-12 20:58:53 +01:00
jimtng
8343703406
Fix NPE on WatchQueueReader (#2563)
Signed-off-by: Jimmy Tanagra <jimmy@tanagra.id.au>
2021-11-11 09:43:24 +01:00
Wouter Born
bf81eaa1c2
Fix/suppress PMD CompareObjectsWithEquals findings (#2548)
Newer PMD versions discover more CompareObjectsWithEquals findings.

Related to https://github.com/openhab/static-code-analysis/pull/423

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-30 19:37:34 +02:00
Wouter Born
569dddd046
Exclude JUnit 4 from Whiteboard and update imports to JUnit 5 (#2534)
* Exclude JUnit 4 from Whiteboard and update imports to JUnit 5

Excludes the transitive JUnit 4 dependency from the Aries JAX-RS Whiteboard.
The Whiteboard should not have a compile scope dependency on JUnit so I've created https://github.com/apache/aries-jax-rs-whiteboard/pull/135 to fix this.
The wrong scope has resulted in some tests using JUnit 4 imports which is also fixed in this PR.

Signed-off-by: Wouter Born <github@maindrain.net>

* Add commonly used JUnit 4 classes to forbidden packages

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-24 10:35:28 +02:00
openhab-bot
fb8308a7a0
New Crowdin updates (#2511)
* New translations chart.properties (Russian)

* New translations hli.properties (Russian)

* New translations jsonStorage.properties (Russian)

* New translations network.properties (Russian)

* New translations audio.properties (Russian)

* New translations ephemeris.properties (Russian)

* New translations persistence.properties (Russian)
2021-10-08 18:02:58 +02:00
openhab-bot
11a96d87d6
New Crowdin updates (#2506)
* New translations addons.properties (Czech)
* New translations audio.properties (Czech)
* New translations brokerConnectionInstance.properties (Czech)
* New translations chart.properties (Czech)
* New translations DefaultSystemChannels.properties (Czech)
* New translations ephemeris.properties (Czech)
* New translations hli.properties (Czech)
* New translations i18n.properties (Czech)
* New translations inbox.properties (Czech)
* New translations jsonStorage.properties (Czech)
* New translations lsp.properties (Czech)
* New translations marketplace.properties (Czech)
* New translations marketplace.properties (Dutch)
* New translations marketplace.properties (Ukrainian)
* New translations network.properties (Czech)
* New translations persistence.properties (Czech)
* New translations restauth.properties (Czech)
* New translations sitemap.properties (Czech)
* New translations SystemProfiles.properties (Czech)
* New translations tags.properties (Czech)
* New translations voice.properties (Czech)
2021-10-05 22:49:21 +02:00
J-N-K
06f8107430
replace multi-parameter constructor with builder on org.openhab.core.Addon (#2499)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-09-29 20:28:15 +02:00
Wouter Born
ba6386d83b
Use CoreItemFactory item type constants in tests (#2497)
This prevents typos and using the constants makes it easier to find out what other items types are accepted.
It also makes it easier to see that these values are item types and not labels or descriptions.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-27 07:34:58 +02:00
J-N-K
4569eea519
Extend marketplace to accept kar and some improvements (#2490)
Also-by: Wouter Born <github@maindrain.net>
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-09-23 17:07:34 +02:00
Wouter Born
41a535bf1c
Metrics improvements and fixes (#2486)
* Fix StringIndexOutOfBoundsException when using rules file name that starts with 'state' (Constant Warnings in RuleMetric #2472)
* Null annotations fixes/improvements
* Add transitive com.codahale.metrics dependency which is used by io.micrometer.core.instrument.dropwizard.DropwizardMeterRegistry. This fixes a NoClassDefFoundError when implementing metrics exporters that use a MeterRegistry extending DropwizardMeterRegistry (e.g. JmxMeterRegistry).
* Prevent ConcurrentModificationException in ThreadPoolMetric at startup:

java.util.ConcurrentModificationException: null
	at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:807) ~[?:?]
	at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:840) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:74) ~[?:?]
	at org.openhab.core.io.monitor.internal.metrics.ThreadPoolMetric.bindTo(ThreadPoolMetric.java:55) ~[?:?]
	at org.openhab.core.io.monitor.internal.DefaultMetricsRegistration.lambda$0(DefaultMetricsRegistration.java:97) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.core.io.monitor.internal.DefaultMetricsRegistration.registerMeters(DefaultMetricsRegistration.java:97) ~[?:?]
	at org.openhab.core.io.monitor.internal.DefaultMetricsRegistration.onReadyMarkerAdded(DefaultMetricsRegistration.java:115) ~[?:?]
	at org.openhab.core.internal.service.ReadyServiceImpl.lambda$0(ReadyServiceImpl.java:52) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1746) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
	at org.openhab.core.internal.service.ReadyServiceImpl.notifyTrackers(ReadyServiceImpl.java:79) ~[?:?]
	at org.openhab.core.internal.service.ReadyServiceImpl.markReady(ReadyServiceImpl.java:52) ~[?:?]
	at org.openhab.core.service.StartLevelService.setStartLevel(StartLevelService.java:248) ~[?:?]
	at org.openhab.core.service.StartLevelService.lambda$0(StartLevelService.java:125) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]

Most likely another issue is that the ThreadPoolMetric does not add metrics for thread pools that are created on demand.

Fixes #2472

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-15 22:32:53 +02:00
Fabian Wolter
ea26451f66
[StartLevel] Use wrapped scheduler to make swallowed exceptions visible (#2481)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-09-15 19:33:21 +02:00
Yannick Schaus
2663a3fc7e
Community Marketplace Add-on Service - initial contribution (#2405)
Signed-off-by: Yannick Schaus <github@schaus.net>
2021-09-14 09:04:04 +02:00
openhab-bot
95da7021d9
New Crowdin updates (#2431)
* New translations tags.properties (German)

* New translations sitemap.properties (Ukrainian)

* New translations network.properties (Italian)

* New translations hli.properties (Greek)

* New translations lsp.properties (Greek)

* New translations validation.properties (Greek)

* New translations units.properties (Greek)

* New translations messages.properties (Greek)

* New translations firmware.properties (Greek)

* New translations i18n.properties (Greek)

* New translations jsonStorage.properties (Greek)

* New translations persistence.properties (Greek)

* New translations addons.properties (Greek)

* New translations restauth.properties (Greek)

* New translations ephemeris.properties (Greek)

* New translations inbox.properties (Greek)

* New translations audio.properties (Greek)

* New translations sitemap.properties (Greek)

* New translations tags.properties (Greek)

* New translations DefaultSystemChannels.properties (Greek)

* New translations chart.properties (Greek)

* New translations network.properties (Greek)

* New translations voice.properties (Greek)

* New translations brokerConnectionInstance.properties (Greek)

* New translations LanguageSupport.properties (Greek)

* New translations SystemProfiles.properties (Greek)
2021-08-31 22:29:06 +02:00
J-N-K
67d9bf5f0e
fix filename stripping (#2442)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2021-07-31 19:07:24 +02:00
Carmine Gianni
7d5f95c078
Corrected a typo (#2444)
Signed-off-by: Carmine Gianni <carmixdev@gmail.com>
2021-07-31 19:04:08 +02:00