diff --git a/build.sbt b/build.sbt index bc435f9..910b634 100644 --- a/build.sbt +++ b/build.sbt @@ -31,38 +31,38 @@ "org.scalatra" %% "scalatra" % ScalatraVersion, "org.scalatra" %% "scalatra-json" % ScalatraVersion, "org.scalatra" %% "scalatra-forms" % ScalatraVersion, - "org.json4s" %% "json4s-jackson" % "3.5.1", - "commons-io" % "commons-io" % "2.5", + "org.json4s" %% "json4s-jackson" % "3.5.3", + "commons-io" % "commons-io" % "2.6", "io.github.gitbucket" % "solidbase" % "1.0.2", "io.github.gitbucket" % "markedj" % "1.0.15", - "org.apache.commons" % "commons-compress" % "1.13", - "org.apache.commons" % "commons-email" % "1.4", - "org.apache.httpcomponents" % "httpclient" % "4.5.3", - "org.apache.sshd" % "apache-sshd" % "1.4.0" exclude("org.slf4j","slf4j-jdk14"), - "org.apache.tika" % "tika-core" % "1.14", + "org.apache.commons" % "commons-compress" % "1.15", + "org.apache.commons" % "commons-email" % "1.5", + "org.apache.httpcomponents" % "httpclient" % "4.5.4", + "org.apache.sshd" % "apache-sshd" % "1.6.0" exclude("org.slf4j","slf4j-jdk14"), + "org.apache.tika" % "tika-core" % "1.17", "com.github.takezoe" %% "blocking-slick-32" % "0.0.10", "com.novell.ldap" % "jldap" % "2009-10-07", - "com.h2database" % "h2" % "1.4.195", + "com.h2database" % "h2" % "1.4.196", "org.mariadb.jdbc" % "mariadb-java-client" % "2.2.1", - "org.postgresql" % "postgresql" % "42.0.0", + "org.postgresql" % "postgresql" % "42.1.4", "ch.qos.logback" % "logback-classic" % "1.2.3", - "com.zaxxer" % "HikariCP" % "2.6.1", - "com.typesafe" % "config" % "1.3.1", - "com.typesafe.akka" %% "akka-actor" % "2.5.0", + "com.zaxxer" % "HikariCP" % "2.7.4", + "com.typesafe" % "config" % "1.3.2", + "com.typesafe.akka" %% "akka-actor" % "2.5.8", "fr.brouillard.oss.security.xhub" % "xhub4j-core" % "1.0.0", "com.github.bkromhout" % "java-diff-utils" % "2.1.1", - "org.cache2k" % "cache2k-all" % "1.0.0.CR1", - "com.enragedginger" %% "akka-quartz-scheduler" % "1.6.0-akka-2.4.x" exclude("c3p0","c3p0"), + "org.cache2k" % "cache2k-all" % "1.0.1.Final", + "com.enragedginger" %% "akka-quartz-scheduler" % "1.6.1-akka-2.5.x" exclude("c3p0","c3p0"), "net.coobird" % "thumbnailator" % "0.4.8", "com.github.zafarkhaja" % "java-semver" % "0.9.0", "org.eclipse.jetty" % "jetty-webapp" % JettyVersion % "provided", "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided", "junit" % "junit" % "4.12" % "test", "org.scalatra" %% "scalatra-scalatest" % ScalatraVersion % "test", - "org.mockito" % "mockito-core" % "2.7.22" % "test", - "com.wix" % "wix-embedded-mysql" % "2.1.4" % "test", - "ru.yandex.qatools.embed" % "postgresql-embedded" % "2.0" % "test", - "net.i2p.crypto" % "eddsa" % "0.1.0" + "org.mockito" % "mockito-core" % "2.13.0" % "test", + "com.wix" % "wix-embedded-mysql" % "3.0.0" % "test", + "ru.yandex.qatools.embed" % "postgresql-embedded" % "2.6" % "test", + "net.i2p.crypto" % "eddsa" % "0.2.0" ) // Compiler settings diff --git a/project/plugins.sbt b/project/plugins.sbt index 57fee14..81262a3 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,10 @@ scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") -addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.12") +addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.13") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5") //addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.0.0") //addSbtPlugin("fi.gekkio.sbtplugins" % "sbt-jrebel-plugin" % "0.10.0") addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0") -addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC13") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0") addSbtPlugin("com.typesafe.sbt" % "sbt-license-report" % "1.2.0") diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt deleted file mode 100644 index 4bca283..0000000 --- a/project/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC11") diff --git a/src/main/scala/gitbucket/core/util/JGitUtil.scala b/src/main/scala/gitbucket/core/util/JGitUtil.scala index e34627e..1f4ed5b 100644 --- a/src/main/scala/gitbucket/core/util/JGitUtil.scala +++ b/src/main/scala/gitbucket/core/util/JGitUtil.scala @@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit import java.util.function.Consumer -import org.cache2k.{Cache2kBuilder, CacheEntry} +import org.cache2k.Cache2kBuilder import org.eclipse.jgit.api.errors.{InvalidRefNameException, JGitInternalException, NoHeadException, RefAlreadyExistsException} import org.eclipse.jgit.diff.{DiffEntry, DiffFormatter, RawTextComparator} import org.eclipse.jgit.dircache.DirCacheEntry @@ -189,11 +189,9 @@ val dir = git.getRepository.getDirectory val keyPrefix = dir.getAbsolutePath + "@" - cache.forEach(new Consumer[CacheEntry[String, Int]] { - override def accept(entry: CacheEntry[String, Int]): Unit = { - if(entry.getKey.startsWith(keyPrefix)){ - cache.remove(entry.getKey) - } + cache.keys.forEach(key => { + if (key.startsWith(keyPrefix)) { + cache.remove(key) } }) }