* Bump org.eclipse.jdt:ecj from 3.43.0 to 3.45.0
* Fix annotation ordering in ThingStatusConditionHandlerTest
* Fix annotation ordering in Gson test DTOs added by @holgerfriedrich
* Revert Gson DTO annotation ordering fix, expect test failure instead
* Add GsonTestClassAnnotated3_DTO with correct annotation order and succeeding test; remove Objects.requireNonNull from ThingImpl.setProperty
* Restore Objects.requireNonNull in ThingImpl.setProperty to satisfy ECJ 3.45.0 null type check
* Fix GsonTest: assertEquals for annotated2 email, improve known-issue comment in annotated test
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* WatchService: use absolute path in processWatchEvent
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* update interface and use a consistent name `fullPath`
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
---------
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This simplifies the sortpom configuration and also allows for checking and reformatting them using the spotless:check and spotless:apply Maven goals.
Signed-off-by: Wouter Born <github@maindrain.net>
* Java 21 language features
* use getFirst and getLast methods
* replace new Locale by Locale.of
* replace Paths.get by Path.of
* use ThreadLocalRandom.current().nextDouble()
* add @Serial annotations
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
A static inner class does not keep an implicit reference to its enclosing instance.
This prevents a common cause of memory leaks and uses less memory per instance of the class.
Signed-off-by: Wouter Born <github@maindrain.net>
While cleaning up the code I found a some more code to cleanup:
* Remove unnecessary boxing
* Use `contains(..)` instead of `indexOf(..) != -1`
* Use `assertInstanceOf` in tests
* Make expensive trace logging conditional
* Remove redundant constructor
* Replace `collect(Collectors.toUnmodifiableList())` with `toList()`
* Replace `filter(..).count() == 0L` with `noneMatch(..)`
* Replace `filter(..).count() > 0` with `anyMatch(..)`
Signed-off-by: Wouter Born <github@maindrain.net>
Stream.toList was introduced in Java 16 and creates an unmodifiable List so it can be used to simplify code whenever the List is not expected to be modified.
Signed-off-by: Wouter Born <github@maindrain.net>
* Add dynamic scripting language transformation service
This replaced SCRIPT transformation with one specific to each language
e.g. JS, RB, GROOVY, etc.
Co-authored-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
* Enhance transformation configuration
This is needed to give the users the best experience when editing transformations in UI.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* Add more null annotations
* Fix mock name
Adds null annotations to most of the tests as well as a few other classes.
Also fixes a few other SAT findings.
Fixes ~300 SAT findings in total.
Signed-off-by: Wouter Born <github@maindrain.net>