Cleanup: apply "Convert lambda to reference"

This commit is contained in:
Mikhail Glukhikh
2017-02-22 16:12:01 +03:00
parent b121bf8802
commit 045a23ae10
82 changed files with 117 additions and 135 deletions
@@ -50,7 +50,7 @@ object PluginCliParser {
configuration: CompilerConfiguration,
classLoader: ClassLoader
) {
val optionValuesByPlugin = arguments.pluginOptions?.map { parsePluginOption(it) }?.groupBy {
val optionValuesByPlugin = arguments.pluginOptions?.map(::parsePluginOption)?.groupBy {
if (it == null) throw CliOptionProcessingException("Wrong plugin option format: $it, should be ${CommonCompilerArguments.PLUGIN_OPTION_FORMAT}")
it.pluginId
} ?: mapOf()
@@ -142,7 +142,7 @@ class ReplFromTerminal(
companion object {
private fun splitCommand(command: String): List<String> {
return Arrays.asList(*command.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray())
return Arrays.asList(*command.split(" ".toRegex()).dropLastWhile(String::isEmpty).toTypedArray())
}
fun run(disposable: Disposable, configuration: CompilerConfiguration) {