Commit Graph

80 Commits

Author SHA1 Message Date
Wouter Born
403b55c8fc Parameterized logging fixes (#1213)
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>
2019-11-14 20:08:06 +01: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
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
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
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
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
Wouter Born
cbb96945f0 Ignore and remove Eclipse project specific settings (#677)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-26 13:04:09 +01: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
fbca7e806f remove project specific JDT settings (#481)
Done per request by @wborn.
Related to: https://github.com/openhab/openhab-core/pull/476#discussion_r251566034

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-01-29 10:24:39 +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
openhab-bot
61e21d4866 [unleash-maven-plugin] Preparation for next development cycle. 2018-12-16 21:49:16 +00: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
Wouter Born
8091914a4b Apply POM Code Convention (#392)
Applies the POM Code Covention as used in OH2/ESH projects.

See also: https://maven.apache.org/developers/conventions/code.html

The executed command is:

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

Signed-off-by: Wouter Born <eclipse@maindrain.net>
2018-09-10 13:45:11 +02:00
Wouter Born
dbed3db57d Remove Eclipse project specific settings and some Groovy leftovers (#391)
Signed-off-by: Wouter Born <eclipse@maindrain.net>
2018-09-08 17:38:56 +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
Wouter Born
33c7f838fc Add Automatic-Module-Name entry to manifests (#369)
Signed-off-by: Wouter Born <eclipse@maindrain.net>
2018-07-21 16:07:17 +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
CloudBees DEV@Cloud
cabe7c4528 [unleash-maven-plugin] Preparation for next development cycle. 2018-05-28 01:54:21 +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
Tanya Georgieva
8a3b3d1074 Changed the indentation for some XML files from spaces to tabs (#310)
Signed-off-by: Tanya D. Georgieva <tanya.dancheva.georgieva@gmail.com>
2018-03-12 18:17:58 +01: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
CloudBees DEV@Cloud
5c6bfba450 [unleash-maven-plugin] Preparation for next development cycle. 2017-12-17 23:40:22 +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
Markus Rathgeb
e57044e13c Rework / formatted manifest (#211)
* reworked and formatted manifest
* added missing jdt.annotation

Related to: https://github.com/eclipse/smarthome/pull/4308

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2017-09-21 08:16:38 +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
6fcb85b311 Version bump to version 2.2.0-SNAPSHOT (#160)
Signed-off-by: Martin van Wingerden <martinvw@mtin.nl>
2017-06-29 08:45:25 +02:00
Kai Kreuzer
14e503736c code cleanup to match expectations of static analysis tool (#151)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-06-02 16:40:55 +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
f089cd912f
added about files
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-04-07 16:26:59 +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
3be8099728 switched to Java8 (#130)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2017-04-05 01:06:43 -07:00