Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.3
    • Component/s: None
    • Labels:

      Description

      Type

      Replacement of tokens

      Approach

      Replacing the null token by the corresponding type, being an array, or a collection.
      Note that using the fully qualified name might be mandatory to not add a new import.

      Before

      int[] foo() {
        return null;
      }
      
      List<String> bar() {
        return null;
      }
      

      After

      int[] foo() {
        return new int[0];
      }
      
      List<String> bar() {
        return Collections.emptyList();
      }
      

      or, with a fully qualified name:

      List<String> bar() {
        return java.util.Collections.emptyList();
      }
      

        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

                Created:
                Updated:
                Resolved: