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

unreachable assignment to final causes compiler error

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: gm110360 Date: 10/01/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)


      In the following:
        static boolean verboseDebug = true;
        ...
        if (verboseDebug)
           verboseDebug = commandLineDebugArg;

      the assignment should be made unreachable when the field verboseDebug is made
      final and false. However the compiler still reports the assignment as an error.
      (Review ID: 132849)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            gafter Neal Gafter
            Reporter:
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: