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

Allow annotation on an assignment

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6u10
    • specification
    • x86
    • windows_7

      A DESCRIPTION OF THE REQUEST :
      Add ASSIGNMENT to the the allowed targets (i.e. ElementType) for an annotation.

      JUSTIFICATION :
      When using SuppresWarnings, it is desirable to use the smallest scope possible. Often, for "unchecked" this occurs on a variable assignment.

      Currently, only a DECLARATION target is allowed. There are situations where warning suppression is required for an assignment that is NOT a declaration.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Should be able to associate an annotation with a variable assignment.
      ACTUAL -
      Can only associate an annotation with an assignment that is part of a declaration.

            abuckley Alex Buckley
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: