Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001108

an attempt to use "<init>" as a method name should elicit NoSuchMethodException

XMLWordPrintable

        When findVirtual (etc.) is presented with the special name <init>, the answer should always be the same as if some other illegal name (<foo>) were presented, regardless of whether there happens to be a matching constructor present.

        This is a gray area in the JSR 292 spec.

        The existing OpenJDK behavior is to refuse to admit that a "method" named <init> exists. We will document this behavior as the standard.

              jrose John Rose
              jrose John Rose
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: