You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Xintong Song (Jira)" <ji...@apache.org> on 2024/04/24 10:11:00 UTC

[jira] [Closed] (FLINK-35148) Improve InstantiationUtil for checking nullary public constructor

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

Xintong Song closed FLINK-35148.
--------------------------------
    Fix Version/s: 1.20.0
       Resolution: Done

master (1.20): 9cc649898d018ca87fa83ae9831ca9bee856f70b

> Improve InstantiationUtil for checking nullary public constructor
> -----------------------------------------------------------------
>
>                 Key: FLINK-35148
>                 URL: https://issues.apache.org/jira/browse/FLINK-35148
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / Core
>    Affects Versions: 1.19.0, 1.18.1
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.20.0
>
>
> {{InstantiationUtil#hasPublicNullaryConstructor}} checks whether the given class has a public nullary constructor. The implementation can be improved a bit: the `Modifier#isPublic` check within the for-loop can be skipped as the {{Class#getConstructors()}} only returns public constructors.
> We can also add a negative unit test for this.



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