ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepak Dixit (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-10757) Upgrade OFBiz to use Java JDK Version 11
Date Fri, 22 Feb 2019 11:31:00 GMT

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

Deepak Dixit commented on OFBIZ-10757:
--------------------------------------

Hi [~taher],

Sorry for the confusion, I shared link just for reference to support your points.
{code:java}
This method propagates any exception thrown by the nullary constructor, including a checked
exception. Use of this method effectively bypasses the compile-time exception checking that
would otherwise be performed by the compiler. The Constructor.newInstance method avoids this
problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException.

The call


 clazz.newInstance()
 

can be replaced by


 clazz.getDeclaredConstructor().newInstance()
 

The latter sequence of calls is inferred to be able to throw the additional exception types
InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses
of ReflectiveOperationException
{code}

> Upgrade OFBiz to use Java JDK Version 11
> ----------------------------------------
>
>                 Key: OFBIZ-10757
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10757
>             Project: OFBiz
>          Issue Type: Improvement
>            Reporter: Taher Alkhateeb
>            Priority: Minor
>         Attachments: OFBIZ-10757-framework.patch, OFBIZ-10757-plugins.patch
>
>
> To implement as per [Discussion Thread|https://lists.apache.org/thread.html/71b8c1048f1dd4c5b3f104233c9af7b2cbc690863fe35b08ef91fcf5@%3Cdev.ofbiz.apache.org%3E]



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

Mime
View raw message