Commit Graph

56 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Hilbrand Bouwkamp
09e2292a58 Replaces 'Eclipse SmartHome' with 'openHAB' in text (#581)
Adapted CONTRIBUTING.md file.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-02-15 10:46:37 +01:00
Markus Rathgeb
a37cceab67 mavenize openHAB and integrate mavenized ESH repository (#467)
* mavenize openHAB and integrate mavenized ESH repository

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-01-28 13:07:31 +01:00
Kai Kreuzer
10acf5cf46 Changed license from EPL v1 to EPL v2 (#466)
* updated license headers
* added NOTICE files
* moved about.html to NOTICE files
* changed main project license
* updated build.properties
* added files to check to prevent error about missing about.html
* removed license info on p2 feature

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-01-16 22:59:49 +01:00
Kai Kreuzer
eb8abdc894 updated to 2019 (#464)
* updated to 2019
* updated checkstyle check to 2019

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-01-07 22:53:19 +01:00
Kai Kreuzer
511a1e4d9f prevent NPEs if persistence service does not play nice (#426)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2018-11-05 16:34:17 +01:00
Kai Kreuzer
b48e50b7a1 replaced last DS XML by annotations (#397)
Correctly register ItemRegistry service

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2018-09-11 11:43:01 +02:00
Kai Kreuzer
47c2e33624 adapted AutoUpdateDelegate to the new ESH auto update infrastructure (#390)
* adapted AutoUpdateDelegate to the new ESH auto update infrastructure
Related to https://github.com/eclipse/smarthome/pull/5011

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2018-09-06 09:33:47 +02:00
Hilbrand Bouwkamp
ad3f6df25a Changed constructors DecimalType to work the same as ESH DecimalType (#372)
The constructors of DecimalType in ESH use BigDecimal.valueOf instead of new BigDecimal. Using valueOf is better because the new constuctors causes undesired rounding. For example the value 0.32 becomes: 0.320000000000000006661338147750939242541790008544921875. With valueOf this doesn't happen.
This change will make it work the same as the ESH DecimalType
Closes #371

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2018-07-23 13:11:05 +02:00
Chris Carman
f748afdd19 Don't lose stacktrace when rethrowing (#359)
* Don't lose stacktrace when rethrowing

Don't destroy the stacktrace information of a caught exception that's about to be rethrown.
2018-06-14 17:37:43 +02:00
Kai Kreuzer
55afd3e74e only regard ESH main type when mapping to OH types (#326)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2018-04-01 21:50:44 +02:00
Kai Kreuzer
9b0bf26c09
added support for QuantityType in the compatibility layer (#319)
This specifically makes the QuantityType backward compatible and makes it treated as a simple DecimalType in any 1.x add-ons, such as specifically the persistence services.

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2018-03-26 14:29:19 +02:00
Martin van Wingerden
5a21ca6b02 Updated copyrights to 2018 (#271)
Signed-off-by: Martin van Wingerden <martinvw@mtin.nl>
2018-01-03 09:26:13 +01:00
Kai Kreuzer
73688b7bd2
adapted DataTimeType mapping to new ESH type (#239)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-12-01 18:05:38 +01:00
Kai Kreuzer
5be5bc8284
reduced logging level as the util class cannot judge the severity (#227)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-11-05 22:06:47 +01:00
Kai Kreuzer
fcfdfbfbe7 adapted to changed ESH API (#218)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-10-10 07:44:12 -07:00
Holger Reichert
d5841d354c [compat1x] Fix ChartProvider API break (#215)
The ESH PR 4291 introduced a change in the ChartProvider API.
This commit changes the compat1x ChartProviderDelegate to work with these changes.

Signed-off-by: Holger Reichert <mail@h0lger.de>
2017-09-26 11:59:13 +02:00
VelinYordanov
54cc26d4a4 Removed unnecessary inheritDoc. (#210)
See openhab/static-code-analysis#103

Signed-off-by: VelinYordanov <velin.iordanov@gmail.com>
2017-09-19 14:40:43 +02:00
Kai Kreuzer
321d6ca5d8 also consider Group items for binding configuration delegation (#205)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-08-31 18:12:55 +02:00
Martin van Wingerden
6bb1ba1057 Updated outdated copyrights (#197)
Signed-off-by: Martin van Wingerden <martinvw@mtin.nl>
2017-08-20 09:56:41 +02:00
Svilen
4005121e6c Fix errors found by the static analysis tool (#182)
Signed-off-by: Svilen Valkanov <svilen.valkanov@musala.com>
2017-08-10 12:46:30 +02:00
Martin van Wingerden
1ccb558db6 Corrected spelling error occured => occurred (#138)
Signed-off-by: Martin van Wingerden <martinvw@mtin.nl>
2017-04-15 11:53:49 +02:00
Kai Kreuzer
485a65e739 applied code formatter (#132)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-04-07 03:42:37 -07:00
Kai Kreuzer
fbb210b970 removed ESHCallType and added correct mapping to new CallItem and StringListType in ESH (#73)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-11-10 11:49:27 +01:00
Georg Sawtschuk
f16c5836d7 Takeover Dimmer.getStateAs implementation from eclipse's core (#70)
Fix for https://github.com/openhab/openhab/issues/4707. DimmerItem.getStateAs returns 0 if PercentType requested. Tested together with influxdb persistence.
2016-10-18 21:07:59 +02:00
Kai Kreuzer
ac7b3c795e added toFullString() method (#68)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-10-12 09:05:23 +02:00
Kai Kreuzer
8c7bd006dd re-added ConsoleInterpreter for openHAB 1 build (#67)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-10-12 09:03:24 +02:00
Kai Kreuzer
7087ea3582 Added new enhanced sound fragment, which brings mp3 support on top of ESH. (#63)
Remove the old audio action as all features should now be covered through ESH itself.

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-09-30 23:00:30 +02:00
Kai Kreuzer
8a7f5561b1 readded old TTS interface so that 1.x compiles (#62)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-09-13 18:12:47 +02:00
Kai Kreuzer
a819b25ff5 changed audio action to implement ESH interface (#58)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-08-29 23:45:32 +02:00
Kai Kreuzer
33b6032405 adapted Audio action to new ESH TTS interfaces (#53)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-08-20 20:49:39 +02:00
Chris Jackson
795aab9b19 Add new persistence method (#55)
* Updated to include new persistence method getItems

Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2016-08-02 22:45:23 +02:00
Kai Kreuzer
3e051a4f85 adapt to ESH changes of ItemRegistry (#47)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-06-05 14:24:45 +02:00
Kai Kreuzer
04cfa9cee3 applied updated and neutral copyright header
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-03-27 22:14:00 +02:00
Kai Kreuzer
dc79b2a815 Merge pull request #26 from digitaldan/backport_of_1460
Backport of https://github.com/openhab/openhab/pull/1460
2016-03-14 22:36:49 +01:00
Kai Kreuzer
485f7a26df adapted to new tts interface location in ESH
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-03-14 19:05:04 +01:00
digitaldan
8c15096a10 Backport of https://github.com/openhab/openhab/pull/1460
This allows group items who are not exactly the same base item to be included in logic operations, for example a dimmer can now be included in a group switch item.
2016-02-22 15:13:10 -08:00
Kai Kreuzer
1b9af5d70e fixes NPE if parameters are null and removed toString calls in logging statements
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-02-22 19:33:09 +01:00
Kai Kreuzer
49ef22b90c Merge pull request #20 from kaikreuzer/agbp
Introduced concurrency fixes as done in https://github.com/openhab/op
2016-02-17 09:47:21 +01:00
Kai Kreuzer
6f0a7acbf6 Introduced concurrency fixes as done in https://github.com/openhab/openhab/pull/3016
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2016-02-17 09:46:30 +01:00