Delete unused methods

This commit is contained in:
Naoki Takezoe
2017-06-25 18:18:23 +09:00
parent 282d5fe239
commit c6e095d066
2 changed files with 0 additions and 36 deletions

View File

@@ -134,17 +134,6 @@ public class JettyLauncher {
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

View File

@@ -220,24 +220,6 @@ object SystemSettingsService {
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 @@ object SystemSettingsService {
})
}
// 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
// }
}