Merge pull request #1522 from xuwei-k/Class-newInstance-deprecated

s/newInstance()/getDeclaredConstructor().newInstance()
This commit is contained in:
Naoki Takezoe
2017-04-02 16:35:04 +09:00
committed by GitHub

View File

@@ -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()