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

Compiler should detect race conditions on final fields

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • None
    • 7
    • tools
    • x86
    • windows_xp

    Description

      A DESCRIPTION OF THE REQUEST :
      Inner classes, instantiated in constructors, potentially provide access to final fields before their initialisation.

      JUSTIFICATION :
      Developer should be warned, if a final field potentially becomes accessed, before it is initialized.
      See: http://www.javaspecialists.eu/archive/Issue192.html


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      javac should output a warning, if reference to an object becomes accessible before it's final fields are initialized.

      ---------- BEGIN SOURCE ----------
      http://www.javaspecialists.eu/archive/Issue192.html
      ---------- END SOURCE ----------

      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: