Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19682

Use Collections.emptyList() For Empty List Values

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha-1
    • 3.0.0-alpha-1, 2.2.0
    • None
    • None
    • Reviewed

    Description

      Use Collection.emptyList() for returning an empty list instead of return new ArrayList<> (). The default constructor creates a buffer of size 10 for ArrayList therefore, returning this static value saves on some memory and GC pressure and saves time not having to allocate a new internally buffer for each instantiation.

      Attachments

        1. HBASE-19682.7.patch
          5 kB
          David Mollitor
        2. HBASE-19682.6.patch
          4 kB
          David Mollitor
        3. HBASE-19682.5.patch
          4 kB
          David Mollitor
        4. HBASE-19682.4.patch
          4 kB
          David Mollitor
        5. example.patch
          19 kB
          Apekshit Sharma
        6. HBASE-19682.3.1.patch
          11 kB
          David Mollitor
        7. HBASE-19682.2.patch
          11 kB
          David Mollitor
        8. HBASE-19682.1.patch
          10 kB
          David Mollitor

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            belugabehr David Mollitor
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment