You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "William Hyun (Jira)" <ji...@apache.org> on 2022/09/03 22:44:00 UTC

[jira] [Closed] (ORC-841) Remove Superfluous Array Fill in StringHashTableDictionary

     [ https://issues.apache.org/jira/browse/ORC-841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Hyun closed ORC-841.
----------------------------

> Remove Superfluous Array Fill in StringHashTableDictionary
> ----------------------------------------------------------
>
>                 Key: ORC-841
>                 URL: https://issues.apache.org/jira/browse/ORC-841
>             Project: ORC
>          Issue Type: Improvement
>    Affects Versions: 1.8.0
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>             Fix For: 1.8.0
>
>
> {code:java|title=StringHashTableDictionary.java}
>   private void doResize(int newCapacity, int oldCapacity) {
>     // ...
>     Arrays.fill(hashBuckets, null);
>     hashBuckets = resizedHashBuckets;
>   }
> {code}
> No need to waste time to null-out of {{hashBuckets}}.  {{hashBuckets}} is overwritten and the Java GC will clean it up, and by extension, all of its elements.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)