diff --git a/src/main/java/JettyLauncher.java b/src/main/java/JettyLauncher.java index 28653b5..94525fd 100644 --- a/src/main/java/JettyLauncher.java +++ b/src/main/java/JettyLauncher.java @@ -134,17 +134,6 @@ return new File(System.getProperty("user.home"), ".gitbucket"); } -// private static void deleteDirectory(File dir){ -// for(File file: dir.listFiles()){ -// if(file.isFile()){ -// file.delete(); -// } else if(file.isDirectory()){ -// deleteDirectory(file); -// } -// } -// dir.delete(); -// } - private static Handler addStatisticsHandler(Handler handler) { // The graceful shutdown is implemented via the statistics handler. // See the following: https://bugs.eclipse.org/bugs/show_bug.cgi?id=420142 diff --git a/src/main/scala/gitbucket/core/service/SystemSettingsService.scala b/src/main/scala/gitbucket/core/service/SystemSettingsService.scala index 4b6e611..248d122 100644 --- a/src/main/scala/gitbucket/core/service/SystemSettingsService.scala +++ b/src/main/scala/gitbucket/core/service/SystemSettingsService.scala @@ -220,24 +220,6 @@ private val LdapSsl = "ldap.ssl" private val LdapKeystore = "ldap.keystore" -// private def getEnvironmentVariable[A](key: String): Option[A] = { -// val value = System.getenv("GITBUCKET_" + key.toUpperCase.replace('.', '_')) -// if(value != null && value.nonEmpty){ -// Some(convertType(value)).asInstanceOf[Option[A]] -// } else { -// None -// } -// } -// -// private def getSystemProperty[A](key: String): Option[A] = { -// val value = System.getProperty("gitbucket." + key) -// if(value != null && value.nonEmpty){ -// Some(convertType(value)).asInstanceOf[Option[A]] -// } else { -// None -// } -// } - private def getValue[A: ClassTag](props: java.util.Properties, key: String, default: A): A = { getSystemProperty(key).getOrElse(getEnvironmentVariable(key).getOrElse { defining(props.getProperty(key)){ value => @@ -262,11 +244,4 @@ }) } -// private def convertType[A: ClassTag](value: String) = -// defining(implicitly[ClassTag[A]].runtimeClass){ c => -// if(c == classOf[Boolean]) value.toBoolean -// else if(c == classOf[Int]) value.toInt -// else value -// } - }