mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 11:36:05 +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");
|
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) {
|
private static Handler addStatisticsHandler(Handler handler) {
|
||||||
// The graceful shutdown is implemented via the statistics handler.
|
// The graceful shutdown is implemented via the statistics handler.
|
||||||
// See the following: https://bugs.eclipse.org/bugs/show_bug.cgi?id=420142
|
// 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 LdapSsl = "ldap.ssl"
|
||||||
private val LdapKeystore = "ldap.keystore"
|
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 = {
|
private def getValue[A: ClassTag](props: java.util.Properties, key: String, default: A): A = {
|
||||||
getSystemProperty(key).getOrElse(getEnvironmentVariable(key).getOrElse {
|
getSystemProperty(key).getOrElse(getEnvironmentVariable(key).getOrElse {
|
||||||
defining(props.getProperty(key)){ value =>
|
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