Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#17186 closed defect (fixed)

Suspicious code in

Reported by: GerdP Owned by: team
Priority: normal Milestone: 19.01
Component: Core Version:
Keywords: Cc: simon04


I did not try it but I assume the 2nd list should use the data from getLastNode()?
If it is an error it exists since a long time.

                // Looking for candidateSegment copies in ways that are referenced by candidateSegment nodes
                List<Way> firstNodeWays = candidateSegment.getFirstNode().referrers(Way.class).collect(Collectors.toList());
                List<Way> secondNodeWays = candidateSegment.getFirstNode().referrers(Way.class).collect(Collectors.toList());

Attachments (1)

17186.patch (2.5 KB) - added by GerdP 2 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 2 months ago by GerdP

Cc: simon04 added; Simon04 removed

comment:2 Changed 2 months ago by simon04

I also stumbled over this suspicious line, but wasn't sure whether this was intended or a bug.

Changed 2 months ago by GerdP

Attachment: 17186.patch added

comment:3 Changed 2 months ago by GerdP

I am not sure if I understood what the code tries to find. The attached patch removes some lines and seems to produce the same results. The unit test also doesn't show what the action is expected to do :-(

comment:4 Changed 2 months ago by GerdP

Resolution: fixed
Status: newclosed

In 14670/josm:

fix #17186: Simplify code in ImproveWayAccuracyAction

comment:5 Changed 2 months ago by simon04

Milestone: 19.01

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.