File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/main/kotlin/ratpack/example/kotlin Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ import ratpack.guice.BindingsSpec
1010
1111class HandlerFactory : ratpack.launch.HandlerFactory {
1212 override fun create (launchConfig : LaunchConfig ? ) : Handler ? {
13- if (launchConfig is LaunchConfig ) {
14- return handler(launchConfig, registerModules, routes)
15- } else {
16- throw IllegalArgumentException (" launchConfig cannot be null" )
17- }
13+ return handler(launchConfig!! , registerModules, routes)
1814 }
1915
2016 /* *
@@ -23,11 +19,11 @@ class HandlerFactory : ratpack.launch.HandlerFactory {
2319 * This is only invoked once during application bootstrap. If you change the
2420 * module configuration of an application, you must restart it.
2521 */
26- private val registerModules = Action { (registry: BindingsSpec ? ) ->
22+ private val registerModules = Action {(registry : BindingsSpec ? ) ->
2723 registry!! .add(MyModule ())
2824 }
2925
30- private val routes = Action { (chain : Chain ? ) ->
26+ private val routes = Action {(chain : Chain ? ) ->
3127 Routes ().execute(chain!! )
3228 }
3329
You can’t perform that action at this time.
0 commit comments