You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@yetus.apache.org by "Sean Busbey (JIRA)" <ji...@apache.org> on 2017/08/19 04:58:00 UTC

[jira] [Created] (YETUS-538) set capacity on ArrayList init where possible

Sean Busbey created YETUS-538:
---------------------------------

             Summary: set capacity on ArrayList init where possible
                 Key: YETUS-538
                 URL: https://issues.apache.org/jira/browse/YETUS-538
             Project: Yetus
          Issue Type: Improvement
          Components: Audience Annotations
    Affects Versions: 0.5.0, 0.4.0
            Reporter: Sean Busbey
            Priority: Minor


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

{code}

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$ 
{code}

{{StabilityOptions}} should be updated to use {{options.length}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)