Skip to content

Fix #308 - Add null check for removing item from uninitialized QuadTree#314

Merged
stephenmcd merged 1 commit into
googlemaps:masterfrom
barbeau:quadTreeRemove
Oct 3, 2016
Merged

Fix #308 - Add null check for removing item from uninitialized QuadTree#314
stephenmcd merged 1 commit into
googlemaps:masterfrom
barbeau:quadTreeRemove

Conversation

@barbeau
Copy link
Copy Markdown
Collaborator

@barbeau barbeau commented Sep 10, 2016

I was able to repro #308 NPE by trying to remove an item before any item was inserted - I added a test case that repro's this NPE at the beginning of PointQuadTreeTest.testMultiplePoints():

response = mTree.remove(item1);
assertFalse(response);

Adding a null check in PointQuadTree.remove() fixes this.

@xsorifc28
Copy link
Copy Markdown

Awesome, can't wait for the merge.

@barbeau
Copy link
Copy Markdown
Collaborator Author

barbeau commented Oct 3, 2016

@stephenmcd a friendly reminder to PTAL, when you have a moment. I was able to repro the bug within the unit test and then fix to make it pass, so it's a pretty straightforward fix.

@stephenmcd
Copy link
Copy Markdown
Contributor

Thanks for the reminder! Looks good.

@stephenmcd stephenmcd merged commit c20c63c into googlemaps:master Oct 3, 2016
@barbeau barbeau deleted the quadTreeRemove branch October 3, 2016 23:53
@philipbjorge
Copy link
Copy Markdown

Thanks all

@natansalda
Copy link
Copy Markdown

Is that possible this bug is introduced again? I still have problem with that, please take a look #348 (comment)

@barbeau
Copy link
Copy Markdown
Collaborator Author

barbeau commented Oct 20, 2021

@natansalda At a glance it looks like this is a different issue - I'll reply on your other comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants