Remove requirement for super() and this() to be 1st call in constructors

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 7
    • Component/s: specification
    • x86
    • windows_7

      A DESCRIPTION OF THE REQUEST :
      Requiring super() or this() to be the first call in a constructor is frustrating and does not prevent super methods being called on the object before it is fully constructed. This requirement offers no benefit and hinders developers.

      See this stack overflow post for detailed discussion:
      http://stackoverflow.com/questions/1168345/why-does-this-and-super-have-to-be-the-first-statement-in-a-constructor

      JUSTIFICATION :
      For example, I cannot revalidate arguments to my constructor prior to passing them to super.


      CUSTOMER SUBMITTED WORKAROUND :
      If you can squish your logic into a single mega-statement, try that.

            Assignee:
            Alex Buckley
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: