﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17224	[Patch] Remove need for left-right-hand-traffic.osm	GerdP	team	"In the German OSM forum a user reports a strange problem which sends JOSM into an endless loop while calculating the data for `RightAndLefthandTraffic`. While this error seems to be caused by either hardware or JRE problems I think there is no need to do the calculations in `JoinAreasAction` at all. My understanding is that JOSM always reads (and stores) the file boundaries.osm in class `Territories` and therefore we just have to combine the ways. The calculation is done in ~20 ms on my machine, so I see no need to store a file `left-right-hand-traffic.osm` in the cachhe directory, esp. when this file is not updated after a change of `boundaries.osm`.
The attached patch removes the corresponding code. If wanted, we may keep the code to be able to visualize the data.

{{{
""main-init-1"" #24 prio=5 os_prio=15 tid=0x000000089c5e1000 nid=0x188c3 runnable [0x00007fffde4e3000]
   java.lang.Thread.State: RUNNABLE
        at org.openstreetmap.josm.actions.JoinAreasAction$WayTraverser.getAngle(JoinAreasAction.java:333)
        at org.openstreetmap.josm.actions.JoinAreasAction$WayTraverser.leftComingWay(JoinAreasAction.java:421)
        at org.openstreetmap.josm.actions.JoinAreasAction.findBoundaryPolygons(JoinAreasAction.java:1175)
        at org.openstreetmap.josm.actions.JoinAreasAction.joinAreas(JoinAreasAction.java:664)
        at org.openstreetmap.josm.tools.RightAndLefthandTraffic.computeOptimizedBoundaries(RightAndLefthandTraffic.java:121)
        at org.openstreetmap.josm.tools.RightAndLefthandTraffic.initialize(RightAndLefthandTraffic.java:72)
        - locked <0x0000000814356e38> (a java.lang.Class for org.openstreetmap.josm.tools.RightAndLefthandTraffic)
        at org.openstreetmap.josm.gui.MainInitialization$$Lambda$144/1233505227.run(Unknown Source)
        at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
        at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:11)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
}}}"	defect	closed	normal	19.01	Core		fixed		
