Commit Graph

790 Commits

Author SHA1 Message Date
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
36ca073ff4 Use constructor injection to simplify lifecycle (#1153)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-20 01:32:44 +02:00
Wouter Born
4895977966 Use isEmpty() instead of "size() == 0" (#1151)
isEmpty() expresses the intent more clearly and is therefore preferred.
Counting the number of elements can also be an expensive operation e.g. when using linked lists.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-20 01:27:11 +02:00
Christoph Weitkamp
8d6d650d2e Fixed potential NPE if 'defaultValue' is null (#1149)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-19 20:08: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
e35a218a30 [xml] Improve ThingTypeXmlProvider exception handling (#1136)
* Improve ThingTypeXmlProvider exception handling

When a binding such as ZWave has hundereds of ThingTypes it's hard to debug thing type definition issues.
This PR adds a UID (ConfigDescription, ChannelType, ChannelGroupType and ThingType) to the logging so it will be easier to find the root cause of exceptions.
Because the exceptions are caught, an error in one ThingType definition will no longer prevent other perfectly fine ThingTypes to be registered so the impact of definition issues is reduced.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-18 22:54:45 +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
21744d22b1 Normalized instantiation of loggers (#1138)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:29:27 +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
Christoph Weitkamp
e7c8be33b2 Fixed minor spelling issue (#1143)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:28:07 +02:00
J-N-K
d7f8eaeec8 fixes for tp-features (#1128)
* fixes for tp-features

* re-enable verification for tp-features
* fix jax-ws feature
* extend jackson feature
* use jackson feature  for swagger-jaxrs-provider

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2019-10-17 12:46:13 +02:00
Christoph Weitkamp
64ae35a0a3 Removed default configuration for ephemeris service from feature file (#1135)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-16 12:36:48 +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
Christoph Weitkamp
d8a0225b48 [rest] Added support for default values containing a list of configuration options (#1031)
* Added support for default values containing a list of configuration options

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-14 12:51:22 +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
933a4ae66a Fix unstable PersistentInboxTest (#1129)
Activating the PersistentInbox after the mocks are initialized prevents the TimeToLiveCheckingThread calling the storage mock which would cause the exception.

Fixes #1091

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-14 07:17:25 +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
J-N-K
cc0fe9882e add a feature for netty (#1126)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2019-10-13 23:20:32 +02:00
Wouter Born
627007d32e Fix InstallServiceCommand SAT findings (#1124)
Suppresses the SystemPrintln SAT findings because this class is a Karaf shell command which prints to the console.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-13 21:52:44 +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
4e10e0d116 Fix SAT JavadocMethodStyleCheck findings (#1109)
* Fix SAT JavadocMethodStyleCheck findings

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-10 14:18:54 +02: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
Wouter Born
0bf3e0a9aa Suppress MavenPomderivedInClasspathCheck (#1107)
This SAT check causes 525 false positives.

See: openhab/static-code-analysis#356

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-08 22:09:37 -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
Kai Kreuzer
a44c55e0e0 Switched to latest super-pom (#1104)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-10-08 07:59:15 +02: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
Wouter Born
7d3c5a1874 Remove @since JavaDoc tags (#1102)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-07 21:21:51 -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
Christoph Weitkamp
6a3c9b03ac Replaced orphaned 'registerHandlerLock' by 'thingLocks' (#1060)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-06 11:17:51 +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
Wouter Born
13e72f6142 Remove notes (#1094)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-04 20:15:02 -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