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

getReturnType() returns VoidType for a constructor

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b91
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      The specification for the method getReturnType() in javax.lang.model.element.ExecutableElement says:

      ---
      TypeMirror getReturnType()
          Returns the return type if this executable represents *a method*. Returns *NoType otherwise*. Returns VoidType if this executable is a method that does not return a value.

             ...
      ---

        For a constructor in the following example VoidType is returned:

      public class S_EE0004 extends TestSource {
          public S_EE0004(Integer param) {}
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sseligmasunw Scott Seligman (Inactive)
              Reporter:
              ashusher Alexander Shusherov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: