javac fails to disallow assignment to final parameter and final exception var

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.4.0
    • Component/s: tools
    • None
    • generic
    • solaris_8

      The spec specifically disallows assigning to a final parameter or a final exception variable, but javac allows it in certain cases. Here is an example:

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

            Assignee:
            Unassigned
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: