Commit Graph

513 Commits

Author SHA1 Message Date
Wouter Born
3d722ec13b
Upgrade UoM dependencies (#2573)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-21 10:27:20 +01:00
spacemanspiff2007
abb17c1658
[rest] Align item endpoint with items endpoint (#2533)
Add option to skip members, e.g. if the goal of the request to just get the metadata of a group item

Signed-off-by: spacemanspiff2007 <git@sgerber.de>
2021-11-02 08:25:18 +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
39dad81ebb
Fix unstable ItemChannelLinkResourceOSGiTest (#2536)
New ItemChannelLinkProviders are added asynchronously to the ItemChannelLinkRegistry, which can cause this test to fail:

TEST org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResourceOSGiTest#shouldReturnLinks() <<< ERROR:
Expected: a collection with size <3>
     but: collection size was <0>
java.lang.AssertionError:
Expected: a collection with size <3>
     but: collection size was <0>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
	at org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResourceOSGiTest.shouldReturnLinks(ItemChannelLinkResourceOSGiTest.java:109)

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-25 16:59:25 +02:00
Wouter Born
a2ef0084d2
Upgrade JAX-RS Whiteboard and CXF (#2532)
* Upgrade JAX-RS Whiteboard and CXF

* Upgrades Aries JAX-RS Whiteboard from 2.0.0 to 2.0.1
* Upgrades CXF from 3.4.3 to 3.4.5

For CXF release notes, see:

* https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310511&version=12350023
* https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310511&version=12350279

Fixes #2512

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-25 11:55:02 +02:00
Wouter Born
d2557f950c
Update bnd to 6.0.0 (#2514)
For release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-6.0.0

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-09 18:43:56 +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
Wouter Born
0d5b2d6140
Upgrade to Karaf 4.3.3 (#2489)
* Syncs dependencies with Karaf 4.3.3
* Resolves itest runbundles for these new dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-18 16:06:57 +02:00
Wouter Born
4d842f4ba3
Upgrade XStream to 1.4.18 (#2482)
For release notes, see:

https://x-stream.github.io/changes.html#1.4.18

Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-11 15:21:31 +02:00
Christoph Weitkamp
b2336a53fd
Resolve itest runbundles for snapshot 3.2.0 (#2419)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-28 11:19: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
Christoph Weitkamp
556d3498c1
Added 'ChannelDescriptionChangedEvent' (#1505)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-06-21 13:03:37 +02:00
Kai Kreuzer
3cac330c5f
[rest] Fix links to group members in REST response (#2399)
* Fix links for to group members in REST response

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-08 21:41:51 +02:00
Kai Kreuzer
17f95768a4
Update to new JmDNS release 3.5.7 (#2391)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-05-30 18:42:50 +02:00
Christoph Weitkamp
585e870183
[config] Changed 'ConfigDescriptionParameterDTO' field serialization 'defaultValue' -> 'default' (#2383)
* Changed ConfigParameterDTO field serialization 'defaultValue' -> 'default'

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-30 18:27:35 +02:00
Christoph Weitkamp
8acaa8994f
Added nullness annotations to Item events (#2384)
* Added nullness annotations to Item events
* Added nullness annotations to tests

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-30 18:27:15 +02:00
Christoph Weitkamp
53e9de5858
Fixed warnings on missing representation properties (#2385)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-25 21:44:51 +02:00
Christoph Weitkamp
d43106c016
Added "timestamp-trigger" Profile (#2364)
* Added Timestamp on Trigger Profile

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-23 22:43:27 +02:00
Wouter Born
85f17aefa4
Upgrade XStream to 1.4.17 (#2369)
Upgrades XStream from 1.4.15 to 1.4.17

Prevents the following vulnerabilities when using XStream instances with an uninitialized security framework:

* CVE-2021-21341
* CVE-2021-21342
* CVE-2021-21343
* CVE-2021-21344
* CVE-2021-21345
* CVE-2021-21346
* CVE-2021-21347
* CVE-2021-21348
* CVE-2021-21349
* CVE-2021-21350
* CVE-2021-21351
* CVE-2021-29505

See: http://x-stream.github.io/changes.html#1.4.17

Related to: #2250, #2251

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-19 21:15:55 +02:00
Wouter Born
e3f12c8a45
Upgrade to Karaf 4.3.2 (#2363)
* Syncs dependencies with Karaf 4.3.2
* Resolves itest runbundles for these new dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-17 21:09:46 +02:00
Christoph Weitkamp
ba53e8a08d
[profiles] Added "timestamp-offset" Profile (#2351)
* Added timestamp-offset Profile
* Fix RAWBUTTON_TOGGLE_ROLLERSHUTTER Profile

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-15 19:39:24 +02:00
Christoph Weitkamp
66525afce6
Expose Channel Type UIDs of default System Channel Types (#2361)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-14 12:21:27 +02:00
Wouter Born
91307993ad
Upgrade Units of Measurement dependencies (#2319)
Upgrades UoM dependencies to:

* javax.measure 2.1.2
* si-units 2.0.1
* indriya 2.1.2

An openHAB OSGi-ified si-units bundle is used as runtime dependency, because the latest si-units release is still missing proper OSGi manifest headers.

Notable changes:

* Quantity not longer implements an `equals` method, so the unit tests had to be adjusted. This should have any impact outside of the unit tests though since the rest of openHAB should be using QuantityType instead.
* RationalConverter is not package private, so instances of it much be created through the MultiplyConverter static functions.
* Quantities.getQuantity can no longer parse values without units like `100`. A workaround has been implemented.
* The unicode greek `mu` letter is now returned for unit prefixes instead of the unicode `micro` character. These characters are visually identical but the unit tests had to be adjusted. The new library seems to parse both types just fine.

Also-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-10 20:54:25 +02:00
Wouter Born
7579aa4d31
Fix more SAT findings and add a few suppressions (#2335)
* Fix more SAT findings and add a few suppressions

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-05 20:59:59 +02:00
Christoph Weitkamp
141e73c85f
Added nullness annotations to Thing events (#2341)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-04 17:04:58 +02:00
Christoph Weitkamp
e4f77f7992
[REST] Added editable flag for ItemChannelLinks by introducing an EnrichedItemChannelLinkDTO (#2318)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-27 11:03:41 +02:00
Christoph Weitkamp
c28c956d66
Fixed JsonParser deprecations (#2320)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-27 10:44:39 +02:00
Björn Lange
6258268031
Ignore illegal thing status updates from REMOVING (#2313)
* Ignore illegal thing status updates from REMOVING

Ignore illegal thing status transitions from REMOVING instead of throwing IllegalArgumentException

Signed-off-by: Björn Lange <blange@itemis.com>
2021-04-26 08:42:16 +02:00
Wouter Born
0fe6b31f19
Upgrade Aries JAX-RS Whiteboard to 2.0.0 (#2316)
Upgrades the Aries JAX-RS Whiteboard from 1.0.9 to 2.0.0

The biggest change is that CXF is now an external dependency of the Aries JAX-RS Whiteboard bundle.
This also fixes the issue that you could not properly debug the CXF code because there was no source code for the embedded classes.
CXF 3.4.3 is now used instead of 3.2.14.

For release notes see:

* Changelog: https://github.com/apache/aries-jax-rs-whiteboard/blob/master/changelog.md
* Apache JIRA: https://issues.apache.org/jira/issues/?jql=project%20%3D%20ARIES%20AND%20fixVersion%20in%20(jax-rs-whiteboard-1.0.10%2C%20jax-rs-whiteboard-1.1.0%2C%20jax-rs-whiteboard-2.0.0)%20AND%20component%20%3D%20jax-rs-whiteboard

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-25 11:23:56 +02:00
Christoph Weitkamp
c80719fefa
Renamed Yahoo to ACME (#2304)
* Rename Yahoo to ACME
* Remove Paper UI references

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-20 22:31:32 +02:00
Wouter Born
94b69e2ccb
Switch properties files encoding from ISO-8859-1 to UTF-8 (#2298)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-19 20:04:23 +02:00
Christoph Weitkamp
4311b167f3
Added unit test for UTF-8 encoded properties (#2295)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-19 17:07:47 +02:00
Wouter Born
05b7ec86f1
Fix new SAT findings (#2291)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-14 18:41:07 +02:00
Sönke Küper
db488d861e
[automation] Added rule rest endpoint and backend operation for rule execution simulation (#2125)
* Added marker interface for TriggerHandler to indicate if they are time based and thus can be used to simulate execution times.
* Added marker interface for ConditionHandler to indicate, if they are time based and thus can be checked during rule execution for a certain time.
* Moved CronAdjuster to common, so it can be used for the rule simulation
* Created RuleExecutionSimulator that allows simulation of rules
* Added method in RuleManger to create simulation
* Added rest endpoint for rule simulation.
* Changed marker interface to return TemporalAdjuster instead of cron expression. This better hides the internals of the TriggerHandler (i.e. the cron expression) and is more clear and flexible for other handlers to implement

Fixes #2044
Fixes #2266

Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-04-11 09:31:48 +02:00
Wouter Born
6eba0a0c33
Upgrade Xtext/Xtend to 2.25.0, LSP4J to 0.10.0 (#2278)
For release notes, see:

https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2021/03/02/version-2-25-0
https://github.com/eclipse/lsp4j/blob/master/CHANGELOG.md#v0100-nov-2020

Also aligns the spifly and xbean runtime dependencies with Karaf 4.3.1 which was not possible because the older Xtext required ASM 8.0.1.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-08 16:17:59 +02:00
Wouter Born
ef1b86c1d1
Upgrade to OSGi R7 and Karaf 4.3.1 (#2264)
* Aligns compile dependencies with OSGi R7
* Aligns runtime dependencies with Karaf 4.3.1
* Fixes issues due to dependency changes:
  * AudioServletTest never ending due to Jetty upgrade
  * Feature resolution failing due to Karaf activation-api no longer visible
* Uses Pax Logging as runtime dependency instead of Felix Log
  This dependency change makes itests and Demo App behave more like the actual distro
  To change the log level in itests, change the value of org.ops4j.pax.logging.DefaultServiceLog.level in itest-include.bndrun
* Adds --add-opens and nashorn.args in itest-include.bndrun to prevent some warnings being logged in itests

Related to openhab/openhab-distro#1167

Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-02 13:39:54 +02:00
Wouter Born
db11cfda51
Add null annotations to org.openhab.core.voice (#2255)
Allows for using null annotations with the voice TTS add-ons.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:19:11 +01:00
Wouter Born
4bf156ffc0
Upgrade Gson to 2.8.6 (#2244)
* Upgrade Gson to 2.8.6

Upgrades Gson from 2.8.2 to 2.8.6.

See change log: https://github.com/google/gson/blob/master/CHANGELOG.md#version-286

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-17 19:18:17 +01:00
Arjan Mels
e20348e8d6
[channel] Fix createChannelBuilders not using overriden label/description (#2229)
* Use channelDefinition in createChannelBuilder

Closes #2225 

Signed-off-by: Arjan Mels <github@mels.email>
2021-03-12 17:54:05 +01:00
Wouter Born
b0b6848e04
Update bnd to 5.3.0 (#2217)
See: https://github.com/bndtools/bnd/wiki/Changes-in-5.3.0

Fixes https://github.com/openhab/openhab-core/issues/2134

Signed-off-by: Wouter Born <github@maindrain.net>
2021-02-28 21:33:08 +01:00
Christoph Weitkamp
191a629e68
Added Sematics actions for Rules (#2088)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-27 10:33:32 +01:00
Christoph Weitkamp
9c0302ec26
[profiles] Added 'Range' profile (#2046)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-27 10:28:09 +01:00
Christoph Weitkamp
76e0cfdb81
[voice] Changed annotation of getPreferredVoice method to allow null results (#2186)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-09 19:26:49 +01:00
Wouter Born
46666eb169
Fix deprecations (#2163)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-30 12:22:31 +01:00
Christoph Weitkamp
12659595a6
Added system default channel type to control color temperature in Kelvin (#2157)
* Added system default channel type for controling color temperature in Kelvin

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-26 08:13:04 +01:00
Wouter Born
074bd7a623
Fix BOM dependency issues (#2120)
* Sync biz.aQute.tester.junit-platform version using bnd.version property
* Remove duplicate osgi-resource-locator dependency, causing warnings/unstability

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-15 16:33:39 +01:00
Wouter Born
c28090497d
Fix unstable tests due to RuleEngine not being started (#2093)
Fixes #1633
Fixes #1955
Fixes #2080

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-09 23:17:40 +01:00
Christoph Weitkamp
c2702d0dfe
Moved NumberExtensionsTest from itest to pure unit test and merged redundant calsses (#2087)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-08 23:17:28 +01:00
Wouter Born
64f444cf6e
Update Mockito, JUnit and use MockitoExtensions in itests (#2075)
* Updates Mockito to 3.7.0
* Updates JUnit to 5.7.0
* Use MockitoExtensions where possible

Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-05 22:58:58 +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
Wouter Born
badabc13e5
Upgrade to XStream 1.4.15 (#1997)
For changes, see: https://x-stream.github.io/changes.html

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-23 20:11:44 +01:00
Christoph Weitkamp
0af74400d2
Added nullness annotations to ThingHandlerHelper (#1993)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-23 12:56:15 +01:00
Wouter Born
bf14e1077f
Apply Spotless, resolve itest runbundles for 3.1.0 (#1982)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:01:42 +01:00
jenkins
965531696b [unleash-maven-plugin] Preparation for next development cycle. 2020-12-20 22:24:39 +00:00
Kai Kreuzer
ad189bd4f1
[automation] Make quantity types available in scripts (#1940)
Fixes #1763

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-16 15:11:46 +01:00
Kai Kreuzer
2b9f890831
Stabelized automation integration test (#1944)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-16 14:13:04 +01:00
Wouter Born
001c00a8c3
Fix remaining deprecations (#1918)
Fixes #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-13 12:22:43 +01:00
Christoph Weitkamp
e909a81f4b
Removed references to not existing category (#1915)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-12 22:35:20 +01:00
Kai Kreuzer
076ac3fe15
Implemented start level service (#1914)
Fixes #1637
Fixes #1777
Fixes #1734
Fixes #1823
Fixes #1808

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-12 14:34:37 +01:00
Wouter Born
0abf1aa987
Remove SmartHome leftovers (#1901)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-08 12:49:06 +01:00
Wouter Born
13c2d7bf2b
Rename classes with "SmartHome" in their name (#1896)
* Rename SmartHomeUnits to Units
* Rename SmartHome Servlets and HTTP Context

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-06 23:35:37 +01:00
Christoph Weitkamp
109fae9974
[profiles] Added 'Hysteresis' profile (#1726)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-29 00:21:43 +01:00
lolodomo
b40d10a978
[inbox REST API] Added new optional pareameter newThingId to approve (#1848)
Fix #1783

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-11-26 08:37:16 +01:00
Kai Kreuzer
89767cee9e
removed deprecated author information from bindings (#1844)
* removed deprecated author information from bindings
* removed author tag from itests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-24 19:01:50 +01:00
silamon
9a12f95dee
Remove the groupname from the members if the group item is removed (#1833)
Remove the groupname from the members if the group item is removed.
This is implemented in the ManagedItemProvider.

Fixes #1785
Fixes #1392

Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-11-22 12:24:38 +01:00
Wouter Born
d5e7fe3ab3
Update LastNPE EEAs to 2.2.1 (#1821)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-17 16:29:09 +01:00
Wouter Born
0281c10036
[infrastructure] add external null-annotations (#1775)
Add EEAs and fix null analysis errors.

Related to:

* #888
* openhab/openhab-addons#8848

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-03 21:33:48 +01:00
Wouter Born
3d88e91952
Open ProviderTracker asynchronously when activating AbstractRegistry (#1719)
* Open ProviderTracker asynchronously when activating AbstractRegistry

Fixes #890

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-18 00:31:13 +02:00
Christoph Weitkamp
4ba70778d1
Added validation for relation between ThingUID and BridgeUID (#1704)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-17 17:59:34 +02:00
Kai Kreuzer
8a3d438c4f
upgraded JmDNS to version 3.5.6 (#1721)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-16 12:52:25 +02:00
Kai Kreuzer
70fed5a9c2
Fixed initialization of group items with aggregation functions (#1718)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-15 23:03:22 +02:00
Wouter Born
d1629e50f3
Upgrade to XStream 1.4.13 (#1688)
* Fixes bugs (vulnerabilities/performance issues)
* Supports OSGi better
* Prevents illegal reflective access warnings on newer Java versions
* Supports java.time converters

For XStream release notes see: https://x-stream.github.io/changes.html

The XmlDocumentReader which uses XStream has also been modified to configure XStream security to prevent "Security framework of XStream not initialized, XStream is probably vulnerable" warnings.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-04 19:56:44 +02:00
Wouter Born
abd2630777
Upgrade Xtext/Xtend to 2.23.0 and LSP 0.9.0 (#1685)
Upgrades to:

* Xtext 2.23.0
* Xtend 2.23.0
* LSP 0.9.0

For Xtext release notes see: https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2020/09/01/version-2-23-0

The Xtext dependencies are now managed using their BOM which makes it easier to keep them in sync.

Because Xtext depends on a newer ASM version some runtime dependencies were also upgraded:

* ASM 8.0.1
* Pax Web 7.2.15
* XBean 4.17.0

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-04 12:27:58 +02:00
Wouter Born
af266b5d9f
Upgrade to Jollyday 0.5.10 (#1684)
With some excludes and the upgraded JAXB I got the most recent Jollyday version working.
The integration tests also succeed again on Java 11.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-03 11:04:25 +02:00
Wouter Born
3bf2f4934d
Upgrade Maven compiler and fix/upgrade some TP dependencies (#1683)
Upgrades the compiler and its dependencies so the compiler results of Maven builds are more similar to those generated in recent Eclipse versions.

To fix compilation issues in Eclipse for add-ons using classes from javax.xml.stream several dependencies were upgraded/excluded.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-02 23:36:37 +02:00
Wouter Born
2dd1a03abd
Fix item channel links not properly initialized (#1634)
* Fix item channel links not properly initialized
* Add ChannelLinkNotifierOSGiTest
* Send at most one channelLinked event per linked thing channel when activating ChannelLinkNotifier
* Send channelUnlinked event only if all items are unlinked
* Use Registry stream instead of getAll

Fixes #1596

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-24 08:41:05 +02:00
Wouter Born
f845772ab0
Remove deprecated BaseThingHandler.initialize() (#1665)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-23 13:33:05 +02:00
Wouter Born
d12c30dfcf
Upgrade Aries JAX-RS Whiteboard to 1.0.9 (#1656)
This version uses CXF 3.2.13 which has some SSE fixes.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-19 15:59:48 +02:00
Wouter Born
f5f1e32b9f
Add null annotations to ConfigDescriptionRegistry and ConfigUtil (#1641)
Also added "org.eclipse.jdt.annotation" to the test BOM so we can use "org.eclipse.jdt.annotation.Checks" in itests.
That class has many useful methods that help with writing more readable test code when using the Eclipse JDT null analysis annotations.

After running the resolver on the itests  a lot of bundles were removed from the itest.bndrun files.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-15 17:00:15 +02:00
Kai Kreuzer
57d4487f36
Removed ChannelItemProvider (#1643)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-14 09:21:55 +02:00
Christoph Weitkamp
eab9be1410
Removed deprecated constructors and methods from Thing API (#1414)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-13 13:53:12 +02:00
Christoph Weitkamp
7eb6d39ae0
[discovery] Added validation for relation between ThingUID and BridgeUID (#1481)
* Added validation for relation between ThingUID and BridgeUID

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-03 20:38:07 +02:00
Christoph Weitkamp
6ae1ece83d
[persistence] Added methods to calculate variance and standard deviation for persisted items (#1551)
* Added methods to calculate variance and standard deviation for persisted items

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-03 20:35:56 +02:00
Christoph Weitkamp
dd04d2eca0
Added unit test for unset thing properties (#1615)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-08-30 17:37:55 +02:00
Wouter Born
057604cc2d
Use new Collection API methods (#1598)
Using the new methods there will be less and more readable code.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-22 23:04:11 +02:00
pacive
0173e23759
Fix tests failing on windows (#1602)
* Fix tests failing on windows

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
2020-08-22 23:03:06 +02:00
Kai Kreuzer
c0ad2a4011
[audio] ported audio sinks from addons to core (#1597)
Also-by: Wouter Born <github@maindrain.net>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-22 08:10:37 +02:00
Wouter Born
d5529f0c1b
Fix various deprecations (#1595)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-15 10:54:41 +02:00
Kai Kreuzer
3c83e8a8eb
switched PersistenceExtensions to ZonedDateTime (#1588)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-12 21:59:55 +02:00
Wouter Born
7300734585
Use "openhab" event topic prefix (#1587)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-11 21:16:49 +02:00
Wouter Born
86b02c26be
Use "openhab" console scope (#1586)
Fixes #1566

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-11 20:38:24 +02:00
Wouter Born
d3ea6063c0
Migrate to JUnit 5 (#1580)
* Migrates all tests to the JUnit 5 Jupiter API
* Updates bnd to 5.1.2
* Updates maven-surefire-plugin to 3.0.0-M5
* Updates Mockito to 3.4.6
* Updates Hamcrest to 2.2
* Removes org.openhab.core.boot POM dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-09 14:36:46 +02:00
Christoph Weitkamp
419c927587
Enhanced JavaDoc for ChannelBuilder (#1572)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-07-29 18:14:54 +02:00
Kai Kreuzer
0f134996f2
removed boot bundle (#1559)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-07-24 13:11:56 +02:00
Paul Vogel
ed21001891
Cleanup tests: Simplify assertEquals with boolean to assertTrue or assertFalse (#1567)
Signed-off-by: Paul Vogel <pavog@users.noreply.github.com>
2020-07-23 22:19:00 +02:00
Christoph Weitkamp
991ccd6599
Remove deprecated method of 'ConfigOptionProvider' (#1541)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-07-12 00:32:37 +02:00
Christoph Weitkamp
72c2ee78d1
Moved 'parseState()' method into 'GroupFunctionHelper' and apply only if needed (#1534)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-07-09 23:25:15 +02:00
Christoph Weitkamp
ecc1f15241
Allow negative numbers in metadata for Items (#1517)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-06-24 22:06:53 +02:00
Christoph Weitkamp
115b3e22f3
Use 'ZoneId.systemDefault()' instead of 'TimeZone.getDefault().toZoneId()' (#1527)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-06-21 14:34:40 +02:00
Christoph Weitkamp
68405036f1
Removed 'Calendar' leftovers (#1522)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-06-14 17:13:28 +02:00
Wouter Born
84bf78d651
Remove Quartz leftovers (#1521)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-06-14 12:48:22 +02:00
Kai Kreuzer
173c93081d
Replaced "classic" rule engine by a DSLRuleProvider for the NGRE (#1451)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-06-14 10:36:25 +02:00
Christoph Weitkamp
1fddac192b
Removed deprecated contructors and methods (#1500)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-06-13 21:01:06 +02:00
Kai Kreuzer
e37c28cfc9
[dsl] Model loading improvements (#1514)
* Model loading improvements

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-06-09 09:37:47 +02:00
Christoph Weitkamp
b7ab807078
Model refactoring, UTF-8 (#1423)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-06-05 20:25:49 +02:00
Wouter Born
02b13f5263
Update maven-javadoc-plugin to 3.2.0 (#1494)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-23 17:35:13 +02:00
Wouter Born
cdfbcc830f
Use ConfigurableService as ComponentPropertyType (#1491)
It is easier to use the ConfigurableService properties when it's possible to annotate classes using a ComponentPropertyType.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-23 17:31:24 +02:00
Kai Kreuzer
97d7ef65a8
removed unused mapdb storage bundle (#1488)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-05-22 09:52:22 +02:00
Christoph Weitkamp
8808f04c30
Removed dependency on 'org.apache.commons.io' (#1441)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-21 15:17:00 +02:00
Christoph Weitkamp
3eb93bf13a
Removed deprecated constructors and methods from Config API (#1448)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-20 22:16:54 +02:00
Christoph Weitkamp
5e8d7554d8
Avoid UnsupportedEncodingException & use const from StandardCharsets (#1480)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-20 21:40:49 +02:00
Christoph Weitkamp
e2c680916e
Merged o.o.c.automation.module.script.defaultscope.tests into o.o.c.automation.module.script.tests (#1485)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-20 21:23:20 +02:00
Wouter Born
f3508e4775
Use constructor injection and update null annotations (#1487)
* Use constructor injection and update null annotations

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-20 17:29:18 +02:00
Wouter Born
84d9438737
Add null annotations to REST resources (#1475)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-17 19:32:35 +02:00
Wouter Born
859da2e1c7
Migrate to JAX-RS Whiteboard (#1443)
* Migrate to JAX-RS Whiteboard
* Upgrade Jackson and Swagger TP feature dependencies

The upstream JAX-RS Whiteboard feature is not used because the version ranges currently do not work with Karaf on Windows.
See: https://issues.apache.org/jira/browse/KARAF-6536

* Update Felix logback to 1.0.2

This version adds the jul-to-slf4j bridge (FELIX-6027).
JUL is used by CXF and using the bridge we can use logback to reduce the verbosity of the info logging whenever org.apache.cxf.endpoint.ServerImpl creates endpoints.

* Update Aries Whiteboard to 1.0.8
* Removes the hated default web application (ARIES-1931)
* Improves performance
* Uses CXF 3.2.12
* Don't reuse SSE event builders

SSE event builders are not thread-safe.
It also causes the wrong default values being used.

Also-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-14 22:32:35 +02:00
Wouter Born
61e17ce39e
Upgrade SAT and Spotless, apply Spotless and enable check (#1446)
* Update SAT and Spotless dependencies
* Apply Spotless and enable check

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-26 11:15:24 +02:00
Christoph Weitkamp
d371a34321
Removed dependency on 'org.apache.commons.lang' (#1433)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-22 14:32:31 +02:00
Christoph Weitkamp
a247a021e1
Removed deprecated constructor for 'DiscoveryResultImpl' (#1428)
* Removed deprecated contructor DiscoveryResultImpl
* Added SuppressWarnings('deprecation')
* Removed set default values
* Added nullness annotations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-20 08:47:20 +02:00
Wouter Born
92027ca922
Use .equals() on constants and literals to prevent NPEs (#1420)
* Use .equals() on constants and literals to prevent NPEs

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-16 07:40:49 +02:00
Christoph Weitkamp
9f41a755e3
Fixed failing ChannelTypesI18nTest because of invalid XML (#1427)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-15 12:50:22 +02:00
Wouter Born
6c85b1bccd
Add and fix more null annotations (#1421)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-15 01:44:37 +02:00
Christoph Weitkamp
b770bb1b4a
Removed 'StateDescriptionProvider' interface (#1413)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-14 21:15:29 +02:00
Wouter Born
fb7a7ac421
Add null annotations to providers and ThingManager (#1412)
* Add null annotations to providers and ThingManager

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-11 08:29:12 +02:00
Wouter Born
017532e2d4
Remove deprecated InboxFilterCriteria (#1417)
- Remove deprecated InboxFilterCriteria

Related to #1408

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-09 21:31:23 +02:00
Christoph Weitkamp
aae207bfe9
Removed 'advanced' attribute from 'ChannelGroupType' (#1410)
* Removed 'advanced' attribute from ChannelGroupType

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-07 09:57:28 +02:00
Wouter Born
945afcdb1a
Add and fix more null annotations (#1407)
* Add and fix more null annotations
* Add more @NonNullByDefault and @Nullable annotations
* Remove unnecessary @NonNull annotations
* Fix a few other trivial SAT issues
* Add constructor injection for MDNSDiscoveryService

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-06 10:45:39 +02:00
Christoph Weitkamp
1981e548aa
[thing] Dynamic state/command provider should not return original description (#1399)
* Clarify return values for implementation
* Dynamic state/command provider should not return original descritpion
* Added ERROR log message
* Added integration test for CommandDescriptionProvider

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-06 08:49:26 +02:00
Wouter Born
1f825fc529
Fix null analysis errors in Eclipse (#1403)
Without helping the compiler a bit, it will show null analysis errors in Eclipse.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-04 18:09:44 +02:00
Kai Kreuzer
427e969ef9
[persistence] Allow persistence services to define default strategies (#1387)
* Allow persistence services to define default strategies
* Added null annotations

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-03-09 21:57:44 +01:00
Kai Kreuzer
857679f66b
removed ThingLinkManager and with it the auto-linking feature and "Simple Mode" (#1385)
* removed ThingLinkManager and with it the auto-linking feature and "Simple Mode"

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed feature from REST API as well

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed tests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-03-03 00:23:04 +01:00
Christoph Weitkamp
11fa4fad4a
Removed dependency on 'org.apache.commons.exec' (#1359)
* Removed dependency on 'org.apache.commons.exec'
* Use StringBuilder

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-02-12 13:20:06 +01:00
Christoph Weitkamp
8b8b5fa0b4 [voice] Simplify lifecycle by using constructor injection (#1343)
* [voice] Simplify lifecycle by using constructor injection
* Removed usage of org.apache.commons.lang.ArrayUtils

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-27 17:55:49 +01:00
Christoph Weitkamp
ac537c53d9 Added public method to remove all members from a group (#1283)
* Added public method to remove all members from a group
* Spelling in itest method names
* File encoding

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-26 12:54:37 +01:00
Kai Kreuzer
86899daf1a replaced Joda Time by Java Time (#1342)
* replaced Joda Time by Java Time

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* removed joda from target platform feature

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* updated tests

Signed-off-by: Kai Kreuzer <kai@openhab.org>

* fixed persistence extension tests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-01-25 22:44:03 +01:00
Christoph Weitkamp
b30c1da741 Added unit test for persistence extension (#1337)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-25 16:17:18 +01:00
Christoph Weitkamp
08da8de5cf Moved "ESH-INF/" folders to "OH-INF/" folders (#1328)
* Moved ESH-INF folders to OH-INF folders

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-17 15:29:18 +01:00
Wouter Born
18d0a52d02 Switch to Java 11 and drop Java 8 support (#1305)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-12 22:32:28 +01:00
Christoph Weitkamp
84009652a8 Changed configurationPid prefixes from 'org.openhab.core' ot 'org.openhab' (#1314)
* Changed configurationPid prefixes from 'org.openhab.core' ot 'org.openhab'

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-02 09:12:34 +01:00
Wouter Born
3811cb9560 Update copyright headers to 2020 (#1309)
* Update copyright headers to 2020

Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-01 18:06:34 +01:00
Christoph Weitkamp
800956598b Applied spotless formatter (#1302)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-30 22:55:19 +01:00
Christoph Weitkamp
bdb6705cde Fixed unstable ConfigDescriptionI18nTest (#1306)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-30 22:32:03 +01:00
Christoph Weitkamp
dd4368e23f Added nullness annotations; Some minor improvements; Unit tests for 'ItemCommandEvent' on group (#1299)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-28 22:25:07 +01:00
Christoph Weitkamp
59675788e0 Renamed packages
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-28 12:18:16 +01:00
Christoph Weitkamp
fca7c215a5 Moved files to new location
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-28 12:18:16 +01:00
Christoph Weitkamp
170e48618b Run resolver on integration tests to fix the build (#1277)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-16 00:22:35 +01:00
jenkins
bc6a380297 [unleash-maven-plugin] Preparation for next development cycle. 2019-12-15 14:55:36 +00:00
Christoph Weitkamp
0046774eb6 Set UNINITIALIZED -> HANDLER_MISSING_ERROR after enabling a Thing and handler is missing (#1243)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-28 15:55:59 +01:00
Markus Rathgeb
0abf994058 use mock instead of real service implementation (#1221)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-11-17 16:20:24 +01:00
Markus Rathgeb
1b99305a96 Fix unexpected behavior while using runblacklist in itests (#1219)
If you would like to use the runblacklist bnd instruction in an
integration test it will not work as expected.

In my current test case it is not used at all.

This is caused because an included file overrides this instruction.

IMHO it would be better to use the "Merged Instructions" feature and use
a postfix in the included file. This way you can use the non postfixed
instruction as usual.

See: https://bnd.bndtools.org/chapters/820-instructions.html#merged-instructions

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-11-17 13:44:16 +01:00
Markus Rathgeb
7ba7ee2a86 update runtime dependencies to sync Jetty and Pax Web versions (#1218)
Use the same Pax Web and Jetty version for the runtime dependencies
(used by the demo application) as is used in the Karaf distribution.

This PR needs to be merged synchron to the updated bndrun in the openHAB
demo repository.

Related to: https://github.com/openhab/openhab-core/pull/1197#issuecomment-553029014

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-11-17 11:47:24 +01:00
Christoph Weitkamp
f682cb56e6 [itest] Applied new source code formatter tool (#1194)
* Applied new source code formatter tool
* Fixed weired descriptions in XML files; Fixed XSD schemaLocations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-13 18:39:32 +01:00
Christoph Weitkamp
7634f3de5f [itest] Exclude json and mapdb storage by default for itests (#1193)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-08 20:04:48 +01:00
Wouter Born
d627a6b7e6 Downgrade Jollyday again to fix Java 11 build issues (#1195)
Jollyday requires JAXB 2.3 on Java 11 whereas only 2.2 is available during compilation for Java 8 compatibility.

See also:
* https://github.com/openhab/openhab2-addons/issues/6334
* https://github.com/openhab/openhab-core/pull/1170
* https://github.com/openhab/openhab-core/pull/1169

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-08 15:18:58 +01:00
Wouter Born
e943ec8970 Upgrade to Xtext 2.19, LSP4J 0.8.0 and fix LSP server (#1171)
Every connection to the LSP server failed because it always threw a org.eclipse.smarthome.model.ide.SitemapIdeSetup NoClassDefFoundError.
Which is caused by the SitemapIdeSetup residing in a package that is split between both the org.openhab.core.model.item.ide and the org.openhab.core.model.sitemap.ide bundles.
The SitemapIdeSetup class is also using classes from the org.eclipse.smarthome.model package which is also a package split between the org.openhab.core.model.items and org.openhab.core.model.sitemap bundles.
After renaming the packages used for the sitemap classes the NoClassDefFoundError is resolved and LSP works properly again.
Many imports were updated for the sitemap model package changes.

Fixes #1030

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-07 16:26:59 +01:00
Gaël L'hopital
4fef0100cb [ephemeris] Evolutions of the Ephemeris module (#1169)
* Evolutions of the Ephemeris module

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-11-04 21:50:43 +01:00
Wouter Born
f002a21da5 Fix SAT errors/warnings in resources and tests (#1178)
Fixes SAT errors/warnings in resources and tests reported by SAT 0.8.0-SNAPSHOT.

Related to openhab/static-code-analysis#363

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-03 11:04:19 +01:00
Christoph Weitkamp
1f9a6f685d Consider more than one value when applying the default value(s) for Things and Channels (#1067)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-01 22:23:52 +01:00
Christoph Weitkamp
2f86782c9d Added 'InstaceCreator' for 'PersistedItem' (#1173)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-01 16:28:53 +01:00
Christoph Weitkamp
92a0017e49 Bump jollyday version to 0.5.9 (#1170)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-29 20:39:11 +01:00
Wouter Born
d7e3297466 Improve HostFragmentSupportTest stability with null assertions (#1166)
waitForAssert doesn't catch NPEs so this PR fixes that by also checking the localized modules for null.

Related to #1089

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-27 19:42:52 +01:00
Christoph Weitkamp
12d91f7da9 [i18n] Refactoring and annotations (#1161)
* Added nullness annotations to 'RuleTemplateI18nUtil'
* Added nullness annotations to 'ConfigDescriptionGroupI18nUtil'
* Moved 'ConfigDescriptionI18nUtil' into internal package
* Moved 'ConfigDescriptionGroupI18nUtil' into internal package
* Moved 'ThingTypeI18nUtil' into internal package
* Use 'ConfigI18nLocalizationService' instead of 'ConfigDescriptionI18nUtil'
* Use default labels / descriptions if application of localization is not successful
* Resolved itest.bndrun files

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-27 11:17:52 +01:00
Wouter Born
2430256b6a Add null annotations to registries (#1134)
Adds null annotations to all registries, the interfaces they implement and a few other classes.

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-23 07:36:56 +02:00
Wouter Born
42a000740d Fix ScopeTest on Windows (#1148)
Fixes #1069

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-20 01:38:41 +02:00
Christoph Weitkamp
a3d91bebfc [automation] Added EphemerisConditions for NGRE (#915)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-20 01:37:56 +02:00
Christoph Weitkamp
22ba5d92c1 Minor profile improvements (#1132)
* Minor code improvements in profile factory
* Added integration test to check if factory creates all available profiles

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-19 15:14:57 +02:00
Wouter Born
44c5355591 Fix unstable AutomationIntegrationJsonTest (#1146)
Sometimes the method returns null causing the test to fail because waitForAssert doesn't catch NPEs.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-19 15:14:26 +02:00
Wouter Born
aa4456425a Fix ConcurrentModificationException in AutomationIntegrationTest (#1147)
When waitForAssert uses ruleEvents.stream() the ruleEventHandler may add an event to ruleEvents at the same time causing a ConcurrentModificationException.
Using a CopyOnWriteArrayList instead of an ArrayList should fix this.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-19 15:13:48 +02:00
Wouter Born
42a0217386 Fixes a few more SAT findings (#1145)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-19 14:10:18 +02:00
Wouter Born
7279ddbbf6 Fix unstable GenericItemProviderTest (#1144)
The test now makes sure the models and items are removed and the removal events have been processed during tearDown so these events don't interfere with subsequent tests.
Also merges the GenericItemProviderTest and GenericItemProvider2Test together which was still a Groovy leftover.

Fixes #1140

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-18 22:56:47 +02:00
Wouter Born
11328bcc9a Fix unstable ChannelTypesTest (#1142)
Most likely the test is unstable because the ChannelGroupTypeProvider is still processing the bundle XML. So using waitForAssert may fix this. It's also used like this to assert the channel types got added by the ChannelTypeProvider.

Fixes #1090

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-18 22:53:11 +02:00
Christoph Weitkamp
0fdd691c22 Removed superflous resources (#1137)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:28:37 +02:00
Mark Hilbush
8396a17d2d Add system profile for a 'rawbutton-on-off-switch' (#1131)
* Add `rawbutton-on-off-switch` profile and tests

Signed-off-by: Mark Hilbush <mark@hilbush.com>
2019-10-14 22:22:18 +02:00
Wouter Born
b337e31621 Improve SafeCallerImplTest stability (#1130)
After some load testing these values improved the stability of the tests.

See: #1113

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-14 07:17:44 +02:00
Wouter Born
017302e3cf Update Mockito to 3.1.0 (#1127)
Mockito 3 does not introduce any breaking API changes, but now requires Java 8 over Java 6 for Mockito 2.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-14 07:14:09 +02:00
Wouter Born
20faf1c63b Fix unstable MDNSDiscoveryServiceOSGiTest (#1123)
Fixes #567

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-13 14:26:38 +02:00
Christoph Weitkamp
91617d8af8 Fixed POM XML Shema Definition path (#1119)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-12 08:52:16 +02:00
Christoph Weitkamp
73d55a9fe9 Changed pid from 'org.eclipse.smarthome.core.i18nprovider' to 'org.eclipse.smarthome.i18n' (#1112)
* Changed pid from 'org.eclipse.smarthome.core.i18nprovider' to 'org.eclipse.smarthome.i18n'

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-11 19:50:04 +02:00
Wouter Born
12e8edc039 Use diamond operator (#1114)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-11 02:29:47 -07:00
Wouter Born
998168698a Fix SAT MethodNameCheck findings (#1111)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-10 11:38:29 +02:00
Wouter Born
3d52c72a91 Fix SAT AuthorContributionDescriptionCheck findings (#1110)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-10 11:36:05 +02:00
Wouter Born
90005e4a56 Fix NoEmptyLineSeparatorCheck and NewlineAtEndOfFileCheck SAT findings (#1108)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-08 22:19:54 -07:00
Wouter Born
08a1f9a86d Fix SAT constant/variable name findings (#1106)
Fixes wrong names identified by the following rules:

* ConstantNameCheck
* LocalFinalVariableNameCheck
* LocalVariableNameCheck
* StaticVariableNameCheck

Most mismatches identified by the MemberNameCheck have also been fixed except for those where the variables are used in events/DTOs etc which would cause issues.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-08 22:19:00 -07:00
Christoph Weitkamp
c86300e420 Fixed wrong trimmed properties (#1105)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-08 09:52:14 -07:00
Wouter Born
12b3c1030f Fix SAT "Initial contribution" warnings (#1100)
Fixes the SAT warning: First javadoc author should have "Initial contribution" contribution description.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-07 21:25:40 -07:00
Wouter Born
3dacba3510 Fix SAT ModifierOrderCheck findings by using JLS suggested modifier order (#1103)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-07 21:24:16 -07:00
Christoph Weitkamp
c31a5aa7ef [storage] Added nullness annotations (#1099)
* Added nullness annotations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-07 20:50:39 +02:00
Wouter Born
9ae7bbe2e8 Move remaining unit tests (#1095)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-04 21:35:13 -07:00
Christoph Weitkamp
2bb5cb7f64 [ephemeris] Adopted configuration for Ephemeris service (#919)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-04 21:33:43 -07:00
Christoph Weitkamp
e1d2ae1c43 [config dispatch] Added support for values containing a list of configuration options (#999)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-03 21:21:12 -07:00
Wouter Born
49f6afc72a Move IO HTTP unit tests (#1081)
* Move IO HTTP unit tests

All IO HTTP tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 22:22:00 +02:00
Wouter Born
f5f58643f4 Move thing XML unit tests (#1079)
* Move thing XML unit tests

Moves the thing XML unit tests from the itests project to the bundle project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 22:21:10 +02:00
Wouter Born
eba9be756b Move UI unit tests (#1078)
* Move UI unit tests

All UI tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 22:20:20 +02:00
Wouter Born
8c17753006 Move voice unit tests (#1077)
* Move voice unit tests

Moves the voice unit tests from the itests project to the bundle project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 22:19:30 +02:00
Wouter Born
8bed617a48 Move compat1x unit tests (#1080)
* Move compat1x unit tests

All compat1x tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 20:00:57 +02:00
Wouter Born
f1f0e9e52b Move IO Net unit tests (#1082)
* Move IO Net unit tests

All IO Net tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 20:00:04 +02:00
Wouter Born
4e07b56279 Move magic unit tests (#1083)
* Move magic unit tests

All magic tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:59:02 +02:00
Wouter Born
28bc05e774 Move model LSP unit tests (#1084)
* Move model LSP unit tests

All model LSP tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:57:48 +02:00
Wouter Born
8af30cc53b Move semantics unit tests (#1085)
* Move semantics unit tests

All semantics tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:57:01 +02:00
Wouter Born
7fc9fa65e9 Move transform unit tests (#1076)
* Move transform unit tests

All transform tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:54:20 +02:00
Wouter Born
c2c57dbf10 Move UI icon unit tests (#1075)
* Move UI icon unit tests

All UI icon tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:53:26 +02:00
Wouter Born
f53beab04c Move thing unit tests (#1074)
* Move thing unit tests

Moves the thing unit tests from the itests project to the bundle project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:52:40 +02:00
Wouter Born
7926b2280e Move core unit tests (#1070)
* Move core unit tests

Moves the core unit tests from the itests project to the bundle project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:51:53 +02:00
Wouter Born
41e95ac16b Move audio unit tests (#1068)
* Move audio unit tests

All audio tests are unit tests so there is no need for an itests project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:50:16 +02:00
Wouter Born
807593aa94 Reenable org.openhab.core.config.discovery.usbserial*.tests (#1065)
Fixes #698

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-02 10:00:08 +02:00
Wouter Born
eda0af1cd2 Fix ExpiringCacheAsyncTest.testFetchValue unreliability (#1066)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-02 09:32:28 +02:00
Christoph Weitkamp
edc27847d1 Enable Model Script Tests (#737)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-01 22:41:57 +02:00
Christoph Weitkamp
5c44d5f8fe Enable Model Rule Tests (#736)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-01 22:24:01 +02:00
Christoph Weitkamp
7a9be81c80 Enable Model Item Tests (#735)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-01 22:22:04 +02:00
Wouter Born
871517008e Reenable org.openhab.core.automation.integration.tests (#1061)
- Reenable org.openhab.core.automation.integration.tests (#1061)

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-01 15:49:43 +02:00
Christoph Weitkamp
8e3a521083 Contructor injection; SAT findings (#1036)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-01 15:20:50 +02:00
Wouter Born
14b24530b9 Reenable org.openhab.core.automation.module.*.tests (#1062)
Reenables:

* org.openhab.core.automation.module.core.tests
* org.openhab.core.automation.module.script.defaultscope.tests
* org.openhab.core.automation.module.script.tests
* org.openhab.core.automation.module.timer.tests

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-01 13:16:19 +02:00
Wouter Born
0b2de2bfea Reenable org.openhab.core.io.transport.upnp.tests (#1057)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-09-30 10:41:39 +02:00
Wouter Born
40418414b2 Reenable org.openhab.core.io.transport.mqtt.tests (#1056)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-09-30 08:23:06 +02:00
Wouter Born
f721a30a36 Reenable org.openhab.core.io.rest.tests (#1055)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-09-29 22:52:26 +02:00
Wouter Born
c9232d9651 Inject SchedulerImpl into DelegatedSchedulerImpl to fix waiting bundles (#1054)
Fixes #1053

Signed-off-by: Wouter Born <github@maindrain.net>
2019-09-29 16:47:19 +02:00
Christoph Weitkamp
978be4cf0f Fixed activation of inbox (#1051)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-28 22:24:05 +02:00
lolodomo
7b49f27823 Fix dynamic options in UI (#1050)
* Fix dynamic options in UI
* Added unit tests

Fixes #1040

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-09-28 21:02:29 +02:00
Christoph Weitkamp
b9d9135771 Use constructor injection to simplify lifecycle (#1037)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-27 12:19:50 +02:00
Christoph Weitkamp
3087c4a427 Moved test from integration to unit test (#1044)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-25 22:19:01 +02:00
Christoph Weitkamp
062692ac55 Enable Config Dispatch Tests (#995)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-16 21:13:02 +02:00
Christoph Weitkamp
cd57f1d79c Refactoring of builders (#908)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-16 21:10:39 +02:00
lolodomo
9724045bb6 [IconServlet] New optional parameter anyFormat (#978)
* [IconServlet] New optional parameter anyFormat

Fix #824

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-09-02 23:22:16 +02:00
Christoph Weitkamp
4ccaa8b38e [rest] Changed property type to Boolean to allow null values (#1010)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-02 16:55:42 +02:00
Christoph Weitkamp
f86d011884 Use constructor injection to simplify lifecycle (#987)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-24 23:49:24 +02:00
Christoph Weitkamp
d16a342663 Streamline DTO serialization for REST item resources (#982)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-24 23:48:42 +02:00
Christoph Weitkamp
e2132a7a46 Use constructor injection to simplify lifecycle (#994)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-24 23:45:46 +02:00
Christoph Weitkamp
be1cd25743 [itemregistry] Use constructor injection to simplify lifecycle (#988)
* Use constructor injection to simplify lifecycle

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>

* PR extended by ItemStateConverter

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-23 18:21:28 +02:00
Christoph Weitkamp
c8395ef5be [persistence] Use constructor injection to simplify lifecycle (#991)
* Use constructor injection to simplify lifecycle
* Added nullness annotations to PersistenceManager
* Removed declaration with null

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-21 20:42:02 +02:00
lolodomo
cb39c5b802 GetLabel: Handle correctly string value looking like a transform pattern (#959)
* GetLabel: Handle correctly string value looking like a transform pattern

Fixes #957

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-19 12:55:28 +02:00
lolodomo
dcea4aa380 ItemUIRegistry: getLabel returning DateTime item formatted in local time zone (#951)
* ItemUIRegistry: getLabel returning DateTime item formatted in local time zone

Fixes #832

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-17 22:28:34 +02:00
Christoph Weitkamp
11b1334ca7 Enable Config XML Tests (#971)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-17 22:27:53 +02:00
Christoph Weitkamp
49e2286a94 Use constructor injection to simplify lifecycle (#976)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-13 21:20:43 +02:00
lolodomo
921c1c1004 Fix integration test for thing: TimestampChangeProfile (#966)
Fixes #961

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-11 19:15:48 +02:00
lolodomo
e05819f6c1 Fix integration test for ExpiringCacheAsync (#968)
Fixes #967

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-10 19:20:36 +02:00
Christoph Weitkamp
4f3e1c17cb Added equality tests for parsing and timzone (#933)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-22 10:44:10 +02:00
Markus Rathgeb
ef05b4d878 start with an upper case on "initial contribution" (#931)
Related to: https://github.com/openhab/openhab-core/pull/916/#discussion_r305082016

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-07-21 12:24:58 +02:00
Christoph Weitkamp
165df518de Bump tec.uom libraries (#923)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-14 21:37:07 +02:00
Markus Rathgeb
781165f3d8 fix nullness handling in itests (#913)
After adding the nullness annotations to the automation stuff, we need
to fix the usage to use a correct nullness handling.

Related to: https://github.com/openhab/openhab-core/pull/910

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-07-09 22:58:22 +02:00
Markus Rathgeb
be40b7a1e8 explicit inspect for null instead of fail because of a NPE (#876)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-20 21:20:59 +02:00
Wouter Born
0f1c1bbb2d Fix Ephemeris ClassNotFoundException (#869)
Fixes #868

Also-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-13 20:03:16 +02:00
Markus Rathgeb
849753befe small improvements of hexutils API and impl. (#862)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-10 17:07:04 +02:00
Markus Rathgeb
e9418cb4c1 split between activation logic (#836)
If a component should be activated an instance is constructed and that
object is activated.
Let's split the construction and activation logic also if constructor
injection is used.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-28 21:36:33 +02:00
Christoph Weitkamp
eef779e91a Added nullness annotations (#837)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-28 17:56:48 +02:00
Christoph Weitkamp
8b59505145 discovery: use constructor injection to simplify lifecycle (#835)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-27 22:47:03 +02:00
Markus Rathgeb
bba6df5372 add printf for console (#793)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-09 08:29:56 +02:00
Christoph Weitkamp
b5f33d341d Added i18n feature for profiles (#785)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 07:50:55 +02:00
Markus Rathgeb
0d996e74a2 audio servlet test: harden against slow test systems (#802)
The test suite for the audio servlet contains a test that will fail on
systems under heavy load (or just imperformant systems).

An audio stream should be added for 1 (streamTimeout) second.
The stream is requested and it is tested that it can be accessed.
After that the test waits until the stream is no more available (this
will be the cause after "streamTimeout").

If the "add stream" and "get request for stream" operations already
exceed the "streamTimeout" limit, the test will fail.
This can be handled in the test case itself if we check the timespan we
need to get the stream and if we know that the stream is allowed to be
non present already, we continue with the next step without failing.

Fixes: https://github.com/openhab/openhab-core/issues/799

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-06 22:42:41 +02:00
Markus Rathgeb
b7b5dfc9fa POM Code Convention (#790)
There is a recommended ordering for all Maven POM files.
See: https://maven.apache.org/developers/conventions/code.html

The POM files has been "fixed" by using the "sortpom-maven-plugin".
The blank lines has been kept to keep the element separation for
readability.
The plugin also fixes indentation etc.
Have a look at: https://github.com/Ekryd/sortpom/wiki

The profile has been set to "recommended_2008_06" that states:
The POM Code Convention that was chosen by Maven developers in 2008

Command that has been executed:

    mvn \
      com.github.ekryd.sortpom:sortpom-maven-plugin:sort \
      -Dsort.keepBlankLines=true \
      -Dsort.predefinedSortOrder=recommended_2008_06

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-05 17:47:41 +02:00
Markus Rathgeb
01985102f3 fix classpath for magic tests (#792)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-04 19:42:32 +02:00