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
21744d22b1
Normalized instantiation of loggers ( #1138 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:29:27 +02:00
Christoph Weitkamp
0fdd691c22
Removed superflous resources ( #1137 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-18 22:28:37 +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
Christoph Weitkamp
73d55a9fe9
Changed pid from 'org.eclipse.smarthome.core.i18nprovider' to 'org.eclipse.smarthome.i18n' ( #1112 )
...
* Changed pid from 'org.eclipse.smarthome.core.i18nprovider' to 'org.eclipse.smarthome.i18n'
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-11 19:50:04 +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
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