You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Martin Wiesner (Jira)" <ji...@apache.org> on 2023/03/03 21:18:00 UTC
[jira] [Created] (OPENNLP-1477) Modernize ExtensionLoader to avoid deprecated Class API
Martin Wiesner created OPENNLP-1477:
---------------------------------------
Summary: Modernize ExtensionLoader to avoid deprecated Class API
Key: OPENNLP-1477
URL: https://issues.apache.org/jira/browse/OPENNLP-1477
Project: OpenNLP
Issue Type: Improvement
Affects Versions: 2.1.0, 2.1.1
Reporter: Martin Wiesner
Assignee: Martin Wiesner
Fix For: 2.1.2
Right now, {{ExtensionLoader}} calls
{code:java}
extClazz.newInstance();
{code}
This call is deprecated in newer JDK versions. It is advised to use
{code:java}
return (T) extClazz.getDeclaredConstructor().newInstance();
{code}
instead in this case.
Aim(s):
* Remove the deprecated form in exchange for the recommended one.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)