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

Description of "final" access bit for fields is not full.

    XMLWordPrintable

Details

    • 1.2fcs
    • sparc
    • solaris_2.4
    • Not verified

    Description



      Name: akC45999 Date: 04/26/98



      Section 4.8 Fields reads:

      ...
      ACC_FINAL 0x0010
        Is final; no further overriding or assignment after initialization.
      Used by: Any field
      ...

      No other explanation of restrictions caused by this access bit is provided.
      So, it is not clear:

      1. what are boundaries of initialization?
      are they the first assigment?
      or are they initialisation methods (<clinit> for static and <init> for dynamic fields)?
      can a static field be reassigned if it has a ConstantValue attribute?
      can initialisation methods assign final fields in other classes, e.g. in the superclass?

      2. what kind of error occur and when, if an attempt is made to
       - override a final field
       - assign a final field after initialisation?

      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              gbrachasunw Gilad Bracha (Inactive)
              rfqsunw Rfq Rfq (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: