sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Karich (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (SIS-39) Capacity is not used and memory waste in QuadTreeNode
Date Fri, 30 Mar 2012 19:24:28 GMT

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

Peter Karich edited comment on SIS-39 at 3/30/12 7:23 PM:
----------------------------------------------------------

Also the 'dataCount' limit is not always correctly used, e.g. in QuadTree in method 'isSimilarQuad'
there the array length is used instead.

Also in L. 171 might be a bug regarding that 'capacity' thing:
{code}
if (u.getCount() < this.capacity) {
       u.addData(data);
{code}
                
      was (Author: peathal):
    Also the 'dataCount' limit is not always correctly used, e.g. in QuadTree in method 'isSimilarQuad'
there the array length is used instead.

                  
> Capacity is not used and memory waste in QuadTreeNode
> -----------------------------------------------------
>
>                 Key: SIS-39
>                 URL: https://issues.apache.org/jira/browse/SIS-39
>             Project: Spatial Information Systems
>          Issue Type: Bug
>            Reporter: Peter Karich
>
> Either 'capacity' should be properly used. Or null checks are necessary in all places
where the raw 'data' array is used. Also what happens if the data array is full? addData should
at least throw an exception then:
> {code}
>   public void addData(QuadTreeData data) {
>     if (this.dataCount < this.capacity) {
>       this.data[dataCount] = data;
>       this.dataCount++;
>     }
>   }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message