mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-15 18:05:50 +01:00
s/newInstance()/getDeclaredConstructor().newInstance()
java.lang.Class#newInstance deprecated since Java 9 http://download.java.net/java/jdk9/docs/api/java/lang/Class.html#newInstance--
This commit is contained in:
@@ -175,7 +175,7 @@ object PluginRegistry {
|
||||
}).foreach { pluginJar =>
|
||||
val classLoader = new URLClassLoader(Array(pluginJar.toURI.toURL), Thread.currentThread.getContextClassLoader)
|
||||
try {
|
||||
val plugin = classLoader.loadClass("Plugin").newInstance().asInstanceOf[Plugin]
|
||||
val plugin = classLoader.loadClass("Plugin").getDeclaredConstructor().newInstance().asInstanceOf[Plugin]
|
||||
|
||||
// Migration
|
||||
val solidbase = new Solidbase()
|
||||
|
||||
Reference in New Issue
Block a user