[ 
https://issues.apache.org/jira/browse/KYLIN-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16692766#comment-16692766
 ] 

ASF GitHub Bot commented on KYLIN-3290:
---------------------------------------

whuwb opened a new pull request #351: KYLIN-3290 Leverage 
getDecalredConstructor().newInstance() instead of newInstance()
URL: https://github.com/apache/kylin/pull/351
 
 
   Issue : https://issues.apache.org/jira/browse/KYLIN-3290
   How to fix : Leverage getDecalredConstructor().newInstance() instead of 
newInstance() 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Avoid calling Class#newInstance
> -------------------------------
>
>                 Key: KYLIN-3290
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3290
>             Project: Kylin
>          Issue Type: Task
>            Reporter: Ted Yu
>            Assignee: Wu Bin
>            Priority: Minor
>              Labels: jdk
>             Fix For: v2.6.0
>
>
> 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 
> wraps the checked exceptions in InvocationException.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to