hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-20180) Avoid Class::newInstance
Date Tue, 13 Mar 2018 01:35:00 GMT
Mike Drob created HBASE-20180:

             Summary: Avoid Class::newInstance
                 Key: HBASE-20180
                 URL: https://issues.apache.org/jira/browse/HBASE-20180
             Project: HBase
          Issue Type: Sub-task
            Reporter: Mike Drob
            Assignee: Mike Drob

Class::newInstance is deprecated starting in Java 9 - https://bugs.openjdk.java.net/browse/JDK-6850612
- because it may throw undeclared checked exceptions. The suggested replacement is {{getDeclaredConstructor().newInstance()}},
which will wrap the checked exceptions in InvocationException.

There's even an error-prone warning about it, we should promote that to error while we're
fixing this.

This message was sent by Atlassian JIRA

View raw message