diff --git a/project/build.scala b/project/build.scala index 69bc304..61db306 100644 --- a/project/build.scala +++ b/project/build.scala @@ -25,6 +25,7 @@ Classpaths.typesafeReleases, "amateras-repo" at "http://amateras.sourceforge.jp/mvn/" ), + scalacOptions := Seq("-deprecation"), libraryDependencies ++= Seq( "org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "3.0.0.201306101825-r", "org.scalatra" %% "scalatra" % ScalatraVersion, diff --git a/src/main/scala/service/WebHookService.scala b/src/main/scala/service/WebHookService.scala index fa81d19..7ddaa11 100644 --- a/src/main/scala/service/WebHookService.scala +++ b/src/main/scala/service/WebHookService.scala @@ -34,7 +34,7 @@ import org.json4s.jackson.Serialization import org.json4s.jackson.Serialization.{read, write} import org.apache.http.client.methods.HttpPost - import org.apache.http.impl.client.DefaultHttpClient + import org.apache.http.impl.client.HttpClientBuilder import scala.concurrent._ import ExecutionContext.Implicits.global @@ -43,7 +43,7 @@ if(webHookURLs.nonEmpty){ val json = write(payload) - val httpClient = new DefaultHttpClient() + val httpClient = HttpClientBuilder.create.build webHookURLs.foreach { webHookUrl => val f = future {