Modify

Opened 9 months ago

Closed 9 months ago

Last modified 5 months ago

#19251 closed task (fixed)

Java 8: use Stream

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.05
Component: Core Version:
Keywords: java refactoring stream Cc:

Description


Attachments (0)

Change History (18)

comment:1 Changed 9 months ago by simon04

In 16436/josm:

see #19251 - Java 8: use Stream

comment:2 Changed 9 months ago by simon04

In 16437/josm:

see #19251 - Fix MapListSetting

comment:3 Changed 9 months ago by simon04

In 16438/josm:

see #19251 - Java 8: use Stream

comment:4 Changed 9 months ago by GerdP

Are you sure that this doesn't cause an endless loop when relation contains itself or when we have more complex loops like
a -> b, b-> c; c->a ?

        nearestList.stream()
                .flatMap(o -> o.getReferrers().stream())
                .filter(r -> r instanceof Relation && predicate.test(r))
                .forEach(nearestList::add);

NavigatableComponent line 1610ff

Last edited 9 months ago by GerdP (previous) (diff)

comment:5 Changed 9 months ago by GerdP

see #19252, probably a regression

comment:6 Changed 9 months ago by simon04

In 16441/josm:

see #19251 - Checkstyle, PMD

comment:7 Changed 9 months ago by simon04

In 16444/josm:

see #19251 - Fix NavigatableComponent.getAllNearest

comment:8 Changed 9 months ago by simon04

In 16445/josm:

see #19251 - Java 8: use Stream

comment:9 in reply to:  7 Changed 9 months ago by simon04

Replying to GerdP:

Are you sure that this doesn't cause an endless loop when relation contains itself or when we have more complex loops like
a -> b, b-> c; c->a ?

No, thanks for spotting the error! Inlining the variable parentRelations was faulty. I addressed this in r16444.

Edit: This error also has been reported by Java: https://josm.openstreetmap.de/jenkins/job/JOSM/6422/warnings9Result/module.1732282867/package.-515814635/

Last edited 9 months ago by simon04 (previous) (diff)

comment:10 Changed 9 months ago by GerdP

Yes, that's why I looked at it ;)

comment:11 Changed 9 months ago by simon04

And I thought you were studiously reading through the lengthy diff. ;-)

comment:12 Changed 9 months ago by simon04

In 16448/josm:

see #19251 - Java warnings

comment:13 Changed 9 months ago by simon04

In 16451/josm:

see #19251 - Java warning, FindBugs

comment:14 Changed 9 months ago by simon04

In 16452/josm:

see #19251 - Java 8: use Stream

comment:15 Changed 9 months ago by simon04

In 16453/josm:

see #19251, see #19252 - fix findFirst/map/orElse sequence

comment:16 Changed 9 months ago by simon04

Resolution: fixed
Status: assignedclosed

comment:17 Changed 9 months ago by GerdP

see #19259 for a regression

comment:18 Changed 5 months ago by GerdP

see #19055 for a regression

Last edited 5 months ago by GerdP (previous) (diff)

Modify Ticket

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