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

unreachable assignment to final causes compiler error

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.3.1
    • tools
    • generic
    • generic



      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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: