From 4a40b2cc688ee89d60c968a3c3c24f1fd153f871 Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 3 Apr 2020 20:36:26 +0100 Subject: [PATCH] Use NoOpCliktCommand to replace the empty run methods Signed-off-by: Graham --- all/src/main/java/dev/openrs2/Command.kt | 8 ++------ .../main/java/dev/openrs2/compress/cli/CompressCommand.kt | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/all/src/main/java/dev/openrs2/Command.kt b/all/src/main/java/dev/openrs2/Command.kt index 7f2d5619bb..2de0059562 100644 --- a/all/src/main/java/dev/openrs2/Command.kt +++ b/all/src/main/java/dev/openrs2/Command.kt @@ -1,6 +1,6 @@ package dev.openrs2 -import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.NoOpCliktCommand import com.github.ajalt.clikt.core.subcommands import dev.openrs2.bundler.BundleCommand import dev.openrs2.compress.cli.CompressCommand @@ -12,7 +12,7 @@ import dev.openrs2.game.GameCommand fun main(args: Array) = Command().main(args) -class Command : CliktCommand(name = "openrs2") { +class Command : NoOpCliktCommand(name = "openrs2") { init { subcommands( BundleCommand(), @@ -24,8 +24,4 @@ class Command : CliktCommand(name = "openrs2") { GameCommand() ) } - - override fun run() { - // empty - } } diff --git a/compress-cli/src/main/java/dev/openrs2/compress/cli/CompressCommand.kt b/compress-cli/src/main/java/dev/openrs2/compress/cli/CompressCommand.kt index 83154c6bdf..ba4bc3b49a 100644 --- a/compress-cli/src/main/java/dev/openrs2/compress/cli/CompressCommand.kt +++ b/compress-cli/src/main/java/dev/openrs2/compress/cli/CompressCommand.kt @@ -1,6 +1,6 @@ package dev.openrs2.compress.cli -import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.NoOpCliktCommand import com.github.ajalt.clikt.core.subcommands import dev.openrs2.compress.cli.bzip2.Bunzip2Command import dev.openrs2.compress.cli.bzip2.Bzip2Command @@ -11,7 +11,7 @@ import dev.openrs2.compress.cli.gzip.GzipCommand fun main(args: Array) = CompressCommand().main(args) -class CompressCommand : CliktCommand(name = "compress") { +class CompressCommand : NoOpCliktCommand(name = "compress") { init { subcommands( Bzip2Command(), @@ -22,8 +22,4 @@ class CompressCommand : CliktCommand(name = "compress") { GunzipCommand() ) } - - override fun run() { - // empty - } }