Commit Graph

94 Commits

Author SHA1 Message Date
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
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
Wouter Born
7926b2280e Move core unit tests (#1070)
* Move core unit tests

Moves the core unit tests from the itests project to the bundle project.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-03 19:51:53 +02:00
Hilbrand Bouwkamp
2f7689e0a7 [OAuth2] redirectURI should be optional on getAccessTokenResponseByAu… (#1073)
* [OAuth2] redirectURI should be optional on getAccessTokenResponseByAuthorizationCode

The redirectURI should be optional (Nullable) on getAccessTokenResponseByAuthorizationCode as in the JavaDoc is stated (as is stated in the refered specification).

* [OAuth2] Removed redundant NonNull

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-10-03 10:27:20 +02:00
Wouter Born
c9232d9651 Inject SchedulerImpl into DelegatedSchedulerImpl to fix waiting bundles (#1054)
Fixes #1053

Signed-off-by: Wouter Born <github@maindrain.net>
2019-09-29 16:47:19 +02:00
lolodomo
7b49f27823 Fix dynamic options in UI (#1050)
* Fix dynamic options in UI
* Added unit tests

Fixes #1040

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-09-28 21:02:29 +02:00
Christoph Weitkamp
b9d9135771 Use constructor injection to simplify lifecycle (#1037)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-27 12:19:50 +02:00
Wouter Born
8509a94cfd Fix DateTimeType parsing of strings with arbitrary number of nano digits (#1039)
* Fix DateTimeType parsing of strings with 2 nano digits

Some formatters such as the DateTimeFormatter.ISO_LOCAL_DATE_TIME may also output a string containing 2 nano digits which fail to be parsed by DateTimeValue.

* Fix parsing of arbitrary number of nano digits for Java 11

Signed-off-by: Wouter Born <github@maindrain.net>
2019-09-18 13:24:41 +02:00
Christoph Weitkamp
cd57f1d79c Refactoring of builders (#908)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-09-16 21:10:39 +02:00
Christoph Weitkamp
b3802d565d [infrastructure] bump SAT to 0.7.0 (#1007)
* Bump SAT version; Fixed high priority findings
* Defined path to feature file to avoid warnings

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-29 09:17:35 +02:00
Christoph Weitkamp
7d4b21f4d9 Fix gamma correction in HSBType (#996)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-28 22:24:16 +02:00
Christoph Weitkamp
5c5c9ae126 Specified OSGi service (#989)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-24 23:47:44 +02:00
Christoph Weitkamp
be1cd25743 [itemregistry] Use constructor injection to simplify lifecycle (#988)
* Use constructor injection to simplify lifecycle

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>

* PR extended by ItemStateConverter

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-08-23 18:21:28 +02:00
Stewart Cossey
f51bd640f3 Fix incorrect unit symbol for Byte and add unit symbol for Octet. (#990)
Signed-off-by: Stewart Cossey <stewart.cossey@gmail.com>
2019-08-21 20:34:08 +02:00
Wouter Born
9d2f09936d Fix null annotations order and cleanup (#958)
* Move null annotations between modifiers and variable type
* Remove redundant public modifiers from interfaces where applicable
* Remove redundant `@NonNull` annotations

Signed-off-by: Wouter Born <github@maindrain.net>
2019-08-08 09:42:30 +02:00
lolodomo
f03f328bf0 DateTimeType: new methods toZone and toLocaleZone (#945)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-02 13:57:39 +03:00
Christoph Weitkamp
95e0190d55 Avoid multiple type castings (#946)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-28 11:32:15 +02:00
Christoph Weitkamp
c95dfcb1cc Added formatting tests for DateTimeType (#938)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-22 21:56:22 +02:00
Christoph Weitkamp
4f3e1c17cb Added equality tests for parsing and timzone (#933)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-22 10:44:10 +02:00
Markus Rathgeb
ef05b4d878 start with an upper case on "initial contribution" (#931)
Related to: https://github.com/openhab/openhab-core/pull/916/#discussion_r305082016

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-07-21 12:24:58 +02:00
Christoph Weitkamp
abab07dfb9 [automation] Added nullness annotations (#910)
* Added nullness annotations

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-08 10:53:25 +02:00
Markus Rathgeb
361d42b20a if null must not be returned, null must not be returned (#875)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-20 21:20:27 +02:00
Markus Rathgeb
0fc38a910b the format pattern must not be null (#874)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-20 21:19:46 +02:00
Markus Rathgeb
8e195d4058 don't use safe caller for event delegation to subscribers (#861)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-19 23:43:17 +02:00
Markus Rathgeb
fefbef50f5 UID: allow to encode arbitrary string (+decode) (#864)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-19 22:42:27 +02:00
Markus Rathgeb
849753befe small improvements of hexutils API and impl. (#862)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-10 17:07:04 +02:00
Markus Rathgeb
3b74ea1dad use separate class for named thread factory (#860)
... to make it usable for others

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-09 20:32:01 +02:00
Markus Rathgeb
9018e9ae80 move event logging for better analyze options (#856)
* move event logging for better analyze options
* add another optional event handling logging

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-06-09 10:33:42 +02:00
Christoph Weitkamp
64a466ff7d Added nullness annotations (#850)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-06-03 14:05:33 +02:00
Christoph Weitkamp
eef779e91a Added nullness annotations (#837)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-28 17:56:48 +02:00
Christoph Weitkamp
0f74348f51 Factored out 'LocalizedKey' into separate class (#808)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-05-09 11:57:40 +02:00
Markus Rathgeb
eaaf01a5fd use mandatory storage services (#787)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-02 21:11:00 +02:00
Christoph Weitkamp
b8de327e15 Added i18n feature for dynamic command descriptions (#771)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-29 19:16:47 +02:00
Christoph Weitkamp
31760bf3a7 Updated xml schema locations to openhab (#769)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-29 19:15:24 +02:00
Markus Rathgeb
25d7f14dfc safe caller: respect classloader of the class and the interfaces (#763)
Related to: https://github.com/openhab/openhab2-addons/issues/5519

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-28 16:20:53 +02:00
Christoph Weitkamp
bc91446ae1 Added i18n feature for dynamic state descriptions (#655)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-26 12:54:40 +02:00
Christoph Weitkamp
387b439509 Reduced logging level in AbstractRegistry (#755)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-04-25 15:10:33 +02:00
David Gräff
8819eb6ef9 add default constructor to MetadataKey (Gson deserialization support) (#727)
Signed-off-by: David Gräff <david.graeff@web.de>
2019-04-15 15:42:46 +02:00
David Gräff
7838a6a46f Update Metadata.java (#704)
Fixes #699 

Signed-off-by: David Gräff <david.graeff@web.de>
2019-04-08 21:07:33 +02:00
Hilbrand Bouwkamp
1d8b7be59b Added units kvarh and kvar. (#695)
Also simplified gravity unit.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-04-07 11:12:06 +02:00
Gaël L'hopital
c6a9085a74 Adding DataAmount (bit and derivatives) and DataTransferRates (bits per second) (#681)
* Adding DataAmount (bit and derivatives) and DataTransferRates (bits per second) to UoM

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2019-03-30 21:43:15 +01: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
Wouter Born
1acb9c8ff2 [core] Increase DateTimeType parsing and formatting precision (#668)
Since Java 9 (JDK-8164428) the maximum resolution from the underlying clock is used.
Instead of just milliseconds the resolution can now even be tenth of microseconds.

According to the Type JavaDocs toFullString() should return the full string representation of the type to be consumed by 'valueOf(String)'.

With the changes in this PR toFullString() may return higher resolution date time strings on newer Java versions and valueOf(value) is able to parse these.

Code depending on a certain resolution returned by toFullString() should use the format(pattern) method instead so the resolution will not change.

Fixes #667

Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-17 13:18:30 +01:00
Markus Rathgeb
fdb23778dc improve nullness of events (#657)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-03-15 09:10:52 +01:00
Wouter Born
48d873a32b Use openHAB license headers (#632)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-03-06 16:10:00 +01:00
Hilbrand Bouwkamp
caa9b71c21 Added new parent class for units to fix import problems. (#618)
The change with unit classes parent (#617) causes it to report missing imports of tec.uom.se when using static import. Before the change this was not a problem because the parent class was SmartHomeUnits. This change adds a new parent class for all units.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-03-02 14:26:01 +01:00