fix: Deprecation warning in PluginManager for using Class.newInstance (#1823)

- Calling Class.newInstance is deprecated. Instead Class.getDeclaredConstructor().newInstance() should be called
This commit is contained in:
Manuel Beck
2025-09-26 19:23:24 +02:00
committed by GitHub
parent 46af3114b8
commit eb5fe4fbda

View File

@@ -564,7 +564,7 @@ public class PluginManager {
c = Class.forName(className);
}
if (c != null & CordovaPlugin.class.isAssignableFrom(c)) {
ret = (CordovaPlugin) c.newInstance();
ret = (CordovaPlugin) c.getDeclaredConstructor().newInstance();
}
} catch (Exception e) {
e.printStackTrace();