Silenced compiler warnings

This commit is contained in:
Piotr Adamski
2013-12-03 18:41:41 +01:00
parent c46e9b2f4d
commit 47714eec45
2 changed files with 6 additions and 7 deletions

View File

@@ -1,8 +1,6 @@
import sbt._ import sbt._
import Keys._ import Keys._
import org.scalatra.sbt._ import org.scalatra.sbt._
import org.scalatra.sbt.PluginKeys._
import sbt.ScalaVersion
import twirl.sbt.TwirlPlugin._ import twirl.sbt.TwirlPlugin._
import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys
@@ -25,7 +23,7 @@ object MyBuild extends Build {
Classpaths.typesafeReleases, Classpaths.typesafeReleases,
"amateras-repo" at "http://amateras.sourceforge.jp/mvn/" "amateras-repo" at "http://amateras.sourceforge.jp/mvn/"
), ),
scalacOptions := Seq("-deprecation"), scalacOptions := Seq("-deprecation", "-language:postfixOps"),
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
"org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "3.0.0.201306101825-r", "org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "3.0.0.201306101825-r",
"org.scalatra" %% "scalatra" % ScalatraVersion, "org.scalatra" %% "scalatra" % ScalatraVersion,
@@ -43,7 +41,7 @@ object MyBuild extends Build {
"com.h2database" % "h2" % "1.3.173", "com.h2database" % "h2" % "1.3.173",
"ch.qos.logback" % "logback-classic" % "1.0.13" % "runtime", "ch.qos.logback" % "logback-classic" % "1.0.13" % "runtime",
"org.eclipse.jetty" % "jetty-webapp" % "8.1.8.v20121106" % "container;provided", "org.eclipse.jetty" % "jetty-webapp" % "8.1.8.v20121106" % "container;provided",
"org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "container;provided;test" artifacts (Artifact("javax.servlet", "jar", "jar")), "org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "container;provided;test" artifacts Artifact("javax.servlet", "jar", "jar"),
"junit" % "junit" % "4.11" % "test" "junit" % "junit" % "4.11" % "test"
), ),
EclipseKeys.withSource := true, EclipseKeys.withSource := true,

View File

@@ -4,6 +4,7 @@ import org.eclipse.jgit.api.Git
import org.eclipse.jgit.revwalk.RevWalk import org.eclipse.jgit.revwalk.RevWalk
import org.eclipse.jgit.treewalk.TreeWalk import org.eclipse.jgit.treewalk.TreeWalk
import org.eclipse.jgit.transport.RefSpec import org.eclipse.jgit.transport.RefSpec
import scala.language.reflectiveCalls
/** /**
* Provides control facilities. * Provides control facilities.
@@ -24,12 +25,12 @@ object ControlUtil {
} }
def using[T](git: Git)(f: Git => T): T = def using[T](git: Git)(f: Git => T): T =
try f(git) finally git.getRepository.close try f(git) finally git.getRepository.close()
def using[T](git1: Git, git2: Git)(f: (Git, Git) => T): T = def using[T](git1: Git, git2: Git)(f: (Git, Git) => T): T =
try f(git1, git2) finally { try f(git1, git2) finally {
git1.getRepository.close git1.getRepository.close()
git2.getRepository.close git2.getRepository.close()
} }
def using[T](revWalk: RevWalk)(f: RevWalk => T): T = def using[T](revWalk: RevWalk)(f: RevWalk => T): T =