Commit Graph

78 Commits

Author SHA1 Message Date
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
Christoph Weitkamp
dd92288e97
Added nullness annotations, ctor injection (#1747)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-24 10:08:38 +02:00
Christoph Weitkamp
7d70a97b77
Fixed IndexOutOfBoundsException in ScriptModuleTypeProvider (#1730)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-19 13:41:58 +02:00
Wouter Born
0d1a15ef34
Update ActionService and ThingActions classes in Xtext cache (#1714)
Xtext uses a cache for looking up classes when rules are run.
It also adds a null class value to this cache when a class is not found.

Once a value has entered the cache it will not be updated.
This causes the cache to return the wrong class (or the null value) when
calling static methods on ActionService and ThingActions classes that
were added/updated.

With the changes in this PR Xtext will be configured to use a custom cache
that updates the ActionService and ThingActions class references.

The PR also has a fix for the AnnotatedThingActionModuleTypeProvider not
properly sending ModuleType removed events when all ThingActions
registrations have been removed.

Fixes #1265
Fixes #1694

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-13 23:17:57 +02:00
Wouter Born
81e82e7d44
Use consistent capitalization with Conditions, Triggers, Actions (#1647)
Fixes #1639

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-15 19:52:35 +02:00
Łukasz Dywicki
7652d04ff6 Remove dependencies which are not present in the project. (#1592)
These cause build to fail with clean repository.

Signed-off-by: Łukasz Dywicki <luke@code-house.org>
2020-09-03 20:33:32 +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
Wouter Born
d5529f0c1b
Fix various deprecations (#1595)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-15 10:54:41 +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
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
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
c747f7f9bb
Fixed removal / replacement of annotated ThingActions (#1536)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-07-21 19:44:55 +02:00
Paul Vogel
27dcce5207
Replace for-loops and iterators with foreach-loops (#1561)
Signed-off-by: Paul Vogel <pavog@users.noreply.github.com>
2020-07-21 17:40:29 +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
Kai Kreuzer
1fdede0f61
[automation] Removed superfluous file
- Removed superfluous file

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-06-08 12:40:06 +02:00
Kai Kreuzer
840335bbd5
[automation] Moved constants to top and made them public for reference (#1513)
* Moved constants to top and made them public for reference

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-06-07 23:03:53 +02:00
Kai Kreuzer
d265e16e67
[automation] Added group and system triggers to automation component (#1509)
* Added group and system triggers to automation component

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-06-04 07:24:42 +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
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
aisebastian
aca4513601
This patch adds more robust value comparison in the rule engine (#1456)
Previously, the state values were compared only if the item state was instanceof DecimalType
which did not work for channels that had a dimension specifier, such as Type:Length. The itemState
instance was of type QuantityType<Quantity<BigDecimal>> and therefore was never compared in the rules

Signed-off-by: Sebastian Irimia <aisebastian@yahoo.com>
2020-05-04 21:58:39 +02:00
Christoph Weitkamp
30839ac487
[automation] Fixed creation of 'EphemerisConditionHandler' (#1453)
* Fixed creation of EphemerisConditionHandler

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-05-02 14:08:11 +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
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
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
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
Christoph Weitkamp
28afe7d866 Remove not needed object array creation for logging (#1344)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-27 09:22:17 +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
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
59675788e0 Renamed packages
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-12-28 12:18:16 +01:00
jenkins
bc6a380297 [unleash-maven-plugin] Preparation for next development cycle. 2019-12-15 14:55:36 +00: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
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
Hilbrand Bouwkamp
d39b6bd35b [automation] Fix typos in EphemerisConditions.json (#1164)
Closes #1163

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-10-24 20:37:24 +02:00
Feras Almannaa
144fc8b56f [automation] Fix the created cron to run only once at the trigger minute. (#1162)
Fixes #1156

Signed-off-by: Feras AlManna <firas.almanna3@gmail.com>
2019-10-23 18:11:42 +02: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
be69d2254e Use !isEmpty() instead of "size() > 0" or "size() != 0" (#1155)
* Use !isEmpty() instead of "size() > 0" or "size() != 0"

!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.

Co-Authored-By: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-21 09:00:52 +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
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
21744d22b1 Normalized instantiation of loggers (#1138)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:29:27 +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
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
3d52c72a91 Fix SAT AuthorContributionDescriptionCheck findings (#1110)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-10 11:36:05 +02:00