Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-35148

Improve InstantiationUtil for checking nullary public constructor

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              liuml07 Mingliang Liu
              liuml07 Mingliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: