Skip to content

Commit

Permalink
remove java methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dsvag committed Nov 7, 2023
1 parent b4a36fc commit d961d8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ElmStore<Event : Any, State : Any, Effect : Any, Command : Any>(
storeListeners: Set<StoreListener<Event, State, Effect, Command>>? = null,
override val startEvent: Event? = null,
private val key: String =
(reducer::class.java.canonicalName ?: reducer::class.java.simpleName).replace(
(reducer::class.qualifiedName?: reducer::class.simpleName).orEmpty().replace(
"Reducer",
"Store",
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ abstract class ScreenDslReducer<Event : Any, Ui : Any, Internal : Any, State : A
val body = Result(state)
@Suppress("UNCHECKED_CAST")
when {
uiEventClass.java.isAssignableFrom(event.javaClass) -> body.ui(event as Ui)
internalEventClass.java.isAssignableFrom(event.javaClass) -> body.internal(event as Internal)
else -> error("Event ${event.javaClass} is neither UI nor Internal")
uiEventClass.isInstance(event) -> body.ui(event as Ui)
internalEventClass.isInstance(event) -> body.internal(event as Internal)
else -> error("Event ${event::class} is neither UI nor Internal")
}
return body.build()
}
Expand Down

0 comments on commit d961d8e

Please sign in to comment.