Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8015831 Add lint check for calling overridable methods from a constructor
  3. JDK-8314437

Release Note: New `javac` Warning When Calling Overridable Methods in Constructors

XMLWordPrintable

      The new lint option, `this-escape`, has been added to `javac` to warn about calls to overridable methods in the constructor body which might result in access to a partially constructed object from subclasses.

      The new warning can be suppressed using `SuppressWarnings("this-escape")`.

            Unassigned Unassigned
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: