Modify

Opened 4 years ago

Closed 4 years ago

#20587 closed defect (fixed)

[PATCH] QuadBuckets `toArray` can infinitely recurse

Reported by: taylor.smock Owned by: Don-vip
Priority: normal Milestone: 21.02
Component: Core Version:
Keywords: Cc:

Description

This behavior is somewhat dependent upon the JVM implementation of ArrayList<>(Collection<T> collection).

However, if the constructor uses toArray to get the initial array for the ArrayList, we have something that looks like this:
toArray -> toList -> toArray -> toList -> toArray -> ...

Attachments (1)

20587.patch (881 bytes ) - added by taylor.smock 4 years ago.
Use this.stream().toArray() instead of this.toList().toArray() for the toArray() function, and document why

Download all attachments as: .zip

Change History (3)

by taylor.smock, 4 years ago

Attachment: 20587.patch added

Use this.stream().toArray() instead of this.toList().toArray() for the toArray() function, and document why

comment:1 by Don-vip, 4 years ago

Milestone: 21.02
Owner: changed from team to Don-vip
Status: newassigned

comment:2 by Don-vip, 4 years ago

Resolution: fixed
Status: assignedclosed

In 17559/josm:

fix #20587 - fix potential infinite loop in QuadBuckets toArray (patch by taylor.smock)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.