mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 23:15:49 +01:00
Merge pull request #1522 from xuwei-k/Class-newInstance-deprecated
s/newInstance()/getDeclaredConstructor().newInstance()
This commit is contained in:
@@ -175,7 +175,7 @@ object PluginRegistry {
|
|||||||
}).foreach { pluginJar =>
|
}).foreach { pluginJar =>
|
||||||
val classLoader = new URLClassLoader(Array(pluginJar.toURI.toURL), Thread.currentThread.getContextClassLoader)
|
val classLoader = new URLClassLoader(Array(pluginJar.toURI.toURL), Thread.currentThread.getContextClassLoader)
|
||||||
try {
|
try {
|
||||||
val plugin = classLoader.loadClass("Plugin").newInstance().asInstanceOf[Plugin]
|
val plugin = classLoader.loadClass("Plugin").getDeclaredConstructor().newInstance().asInstanceOf[Plugin]
|
||||||
|
|
||||||
// Migration
|
// Migration
|
||||||
val solidbase = new Solidbase()
|
val solidbase = new Solidbase()
|
||||||
|
|||||||
Reference in New Issue
Block a user