* 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>
* 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>
* 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>
* Fix bug in ChannelDTOMapper
* Add AutoUpdatePolicy to ChannelDTO
Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
When a thing is enabled, the `ThingManagerImpl` takes care of calling `ThingHandler#initialize()`.
That makes totally sense if the thing was disabled before. However, if `setEnabled(thingUID, true)` is called for a thing which was already enabled, it causes an additional initialization.
Since concurrent hanlder initializations may cause trouble, it is safer to prevent this. Therefore enabling a thing (including starting its thing handler) should only be performed if the thing is disabled.
Signed-off-by: Michael Reitler <michael.dicke@smail.inf.h-brs.de>
* Minor code improvements; Added nullness annotations to ThingActions and ThingHandlerService
* Revert renaming of 'thingRegistry' property
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Added unit test to cover #1226
* Call 'removeItem()' with item name instead of ThingUID
* Added nullness annotations
* Use constructor injection
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
Make sure Throwables are not be substituted into log messages so they can be formatted according to the logging configuration.
Signed-off-by: Wouter Born <github@maindrain.net>
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>
* Added contructor injection to thing xml
* Removed Nullable from getChannels and getChannelGroups
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* 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>
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>
* 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>
* 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>
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>
Fixes the SAT warning: First javadoc author should have "Initial contribution" contribution description.
Signed-off-by: Wouter Born <github@maindrain.net>