Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17186 closed defect (fixed)

Suspicious code in ImproveWayAccuracyAction.java

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

Description

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 6 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by GerdP, 6 years ago

Cc: simon04 added; Simon04 removed

comment:2 by simon04, 6 years ago

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

by GerdP, 6 years ago

Attachment: 17186.patch added

comment:3 by GerdP, 6 years ago

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 by GerdP, 6 years ago

Resolution: fixed
Status: newclosed

In 14670/josm:

fix #17186: Simplify code in ImproveWayAccuracyAction

comment:5 by simon04, 6 years ago

Milestone: 19.01

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.