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/06 18:29:00 UTC

[jira] [Closed] (OPENNLP-1477) Modernize ExtensionLoader to avoid deprecated Class API

     [ https://issues.apache.org/jira/browse/OPENNLP-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Wiesner closed OPENNLP-1477.
-----------------------------------
    Resolution: Fixed

> 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
>            Priority: Minor
>             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)