Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-1167

Annotations should be handled in all cases allowed by java 8

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4
    • Component/s: Plugin
    • Labels:
      None

      Description

      The annotations described in the code below are currently lost when building the strongly type tree.

      class A implements @Foo B {
        List<@Foo ? extends Object> myList1;
        List<@Foo Object> myList2;
      
        java.lang. @Foo Integer myInt;
      
        int foo() @Foo[] {
          int[] array1 = new @Foo int[5]; 
          int array2[] = new int @Foo [3];
      
          int a = 42;
          long b = (@Foo long) a;
      
          return null;
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.gumowski Michael Gumowski
              Reporter:
              michael.gumowski Michael Gumowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: