-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline functions for routing #1539
Conversation
Also: * Introduce inline fun with generics. * Add `unableToRoute()` function. * Address console warnings on receptors. * Bump McJava -> `2.0.0-SNAPSHOT.171`.
Also: * Add extension inline fun for routing.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1539 +/- ##
============================================
+ Coverage 89.78% 89.79% +0.01%
+ Complexity 4998 4994 -4
============================================
Files 648 648
Lines 15692 15690 -2
Branches 906 906
============================================
Hits 14089 14089
+ Misses 1286 1285 -1
+ Partials 317 316 -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-yevsyukov Almost LGTM. Please see my comments.
server/src/main/java/io/spine/server/entity/EventDispatchingRepository.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-yevsyukov LGTM.
As discussed, Kotlin Set<I>
means Set<? extends I>
in Java, since it has a built-in covariance for the generic type. In routing, we expect exactly I
-typed IDs. So the explicit cast is better in terms of semantics.
This PR converts
CommandRouting
andEventRouting
to Kotlin, extending these classes with inline functions for idiomatic routing configuration in Kotlin.Other notable changes: