Mingliang Liu created FLINK-35148:
-------------------------------------
Summary: 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.18.1, 1.19.0
Reporter: Mingliang Liu
{{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)