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

Konrad Windszus updated JCR-5154:
---------------------------------
    Description: 
Since Java 9 the method [Class.newInstance() is 
deprecated|https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#newInstance()].
 Those methods should be replaced by 
{code}
clazz.getDeclaredConstructor().newInstance()
{code}

This query gives a rough overview of methods to replace: 
https://github.com/search?q=repo%3Aapache%2Fjackrabbit%20newInstance()&type=code
 (however there are some false positives in there).

  was:
Since Java 9 the method [Class.newInstance() is 
deprecated|https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#newInstance()].
 Those methods should be replaced by 
{code}
clazz.getDeclaredConstructor().newInstance()
{code}


> Replace deprecated call of Class.newInstance()
> ----------------------------------------------
>
>                 Key: JCR-5154
>                 URL: https://issues.apache.org/jira/browse/JCR-5154
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>            Reporter: Konrad Windszus
>            Priority: Trivial
>
> Since Java 9 the method [Class.newInstance() is 
> deprecated|https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#newInstance()].
>  Those methods should be replaced by 
> {code}
> clazz.getDeclaredConstructor().newInstance()
> {code}
> This query gives a rough overview of methods to replace: 
> https://github.com/search?q=repo%3Aapache%2Fjackrabbit%20newInstance()&type=code
>  (however there are some false positives in there).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to