From 38a56358dc0f61892bbf799b947edf69a5742f8e Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Tue, 10 Dec 2019 10:37:14 -0800 Subject: [PATCH] Add type annotation for shutdown hooks Intellij couldn't handle this without an annotation. --- main/src/main/scala/sbt/internal/ShutdownHooks.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/scala/sbt/internal/ShutdownHooks.scala b/main/src/main/scala/sbt/internal/ShutdownHooks.scala index 02263706f..385848371 100644 --- a/main/src/main/scala/sbt/internal/ShutdownHooks.scala +++ b/main/src/main/scala/sbt/internal/ShutdownHooks.scala @@ -38,7 +38,7 @@ private[sbt] object ShutdownHooks extends AutoCloseable { () => Option(hooks.remove(id)).foreach(_.apply()) } private def runAll(): Unit = if (ranHooks.compareAndSet(false, true)) { - hooks.forEachValue(runtime.availableProcessors.toLong, _.apply()) + hooks.forEachValue(runtime.availableProcessors.toLong, (_: () => Unit).apply()) } override def close(): Unit = { runtime.removeShutdownHook(thread)