Skip to content

Commit f8df8a8

Browse files
author
Nemo Oudeis
committed
refactor: change Route type from ArrayList<> to List<>
the reasoning is (a) that this leaks the implementation detail into the public API and (2) the the call site usage, e.g. ``` dispatch(SetRouteAction(arrayListOf("route-a", "route-b") // vs. dispatch(SetRouteAction(listOf("route-a", "route-b") ``` This does not break API contract, all code using the current version of ReKotlin-router still compiles fine, because every instance of `ArrayList` is also a `List`.
1 parent b1ca319 commit f8df8a8

File tree

1 file changed

+1
-1
lines changed
  • rekotlin-router/src/main/java/org/rekotlinrouter

1 file changed

+1
-1
lines changed

rekotlin-router/src/main/java/org/rekotlinrouter/Routable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package org.rekotlinrouter
33
typealias RoutingCompletionHandler = () -> Unit
44

55
typealias RouteElementIdentifier = String
6-
typealias Route = ArrayList<RouteElementIdentifier>
6+
typealias Route = List<RouteElementIdentifier>
77

88

99
interface Routable {

0 commit comments

Comments
 (0)