Uploaded image for project: 'Yetus'
  1. Yetus
  2. YETUS-538

set capacity on ArrayList init where possible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.4.0, 0.5.0
    • 0.6.0
    • Audience Annotations

    Description

      we have one case of not giving the ArrayList constructor an initial capacity

      Busbey-MBA:yetus busbey$ git grep "new ArrayList"
      audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/RootDocProcessor.java:      List<Object> list = new ArrayList<Object>(array.length);
      audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java:    List<String[]> optionsList = new ArrayList<String[]>();
      Busbey-MBA:yetus busbey$ 
      

      StabilityOptions should be updated to use options.length

      Attachments

        1. YETUS-538.00.patch
          1 kB
          Gézapeti

        Issue Links

          Activity

            People

              gezapeti Gézapeti
              busbey Sean Busbey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: