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

Are final parameters considered blank finals?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.0
    • specification
    • generic
    • solaris_8

      javac treats final parameters as non-blank finals, performing DA/DU
      analysis on them. Some other compilers don't. The jacks test 16.1.5-not-assignable-5 checks for this. Which is right?

      The following test distinguishes the compiler behavior.

      class T {
      public static void main(final String[] args) {
          if (true ? true : (args = null));
      }
      }

      similarly, the exception parameter declaration in a catch block.

            gbrachasunw Gilad Bracha (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: