[ 
https://issues.apache.org/jira/browse/SENTRY-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855156#comment-15855156
 ] 

Alexander Kolbasov commented on SENTRY-1615:
--------------------------------------------

As pointed out by [[email protected]] it is better to use {code}new 
HashSet<>{code} - it has an extra benefit that we sometimes know the size. 

> SentryStore should not allocate empty objects that are immediately returned
> ---------------------------------------------------------------------------
>
>                 Key: SENTRY-1615
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1615
>             Project: Sentry
>          Issue Type: Improvement
>          Components: Sentry
>    Affects Versions: 1.8.0, sentry-ha-redesign
>            Reporter: Alexander Kolbasov
>            Assignee: Alexander Kolbasov
>            Priority: Minor
>         Attachments: SENTRY-1615.001.patch
>
>
> There are a few places where SentryStore returns some empty lists or sets - 
> it shouldn't allocate them but return pre-made Collection objects.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to