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

Class.newInstance() versus inner classes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 7
    • Component/s: specification
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      rc
    • CPU:
      generic
    • OS:
      solaris_7
    • Verification:
      Verified

      Description

      JLS 13.4.11 (Method and Constructor Declarations) together with the documentation for Class.newInstance() imply that you can instatiate an inner class this way. But of course you can't, because of the additional parameter supplied by the compiler. This needs to be documented somewhere.

      [And if I hear one more time that this belongs in the "Java compiler specification" I'll just have to write one. So don't make me do it. ;-)]

      neal.gafter@Eng 2001-01-05

        Attachments

          Activity

            People

            • Assignee:
              abuckley Alex Buckley
              Reporter:
              gafter Neal Gafter
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: