From f769f29bc7543fd137d9a61355689b572c21d22a Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Mon, 12 Dec 2016 18:12:16 +0900 Subject: [PATCH] Unit is not Unit scala.Unit is companion object of `()` ``` Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112). Type in expressions for evaluation. Or try :help. scala> val a = () a: Unit = () scala> val b = Unit b: Unit.type = object scala.Unit scala> a == b :14: warning: comparing values of types Unit and Unit.type using `==' will always yield false a == b ^ res1: Boolean = false ``` --- src/main/scala/gitbucket/gist/controller/GistController.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/gitbucket/gist/controller/GistController.scala b/src/main/scala/gitbucket/gist/controller/GistController.scala index ed65c8d..ed7af4e 100644 --- a/src/main/scala/gitbucket/gist/controller/GistController.scala +++ b/src/main/scala/gitbucket/gist/controller/GistController.scala @@ -254,7 +254,7 @@ trait GistControllerBase extends ControllerBase { .setOutputStream(response.getOutputStream) .call() - Unit + () } }