mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 02:56:08 +01:00
Delete unused methods
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user