﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
9417	Validator tests are initialized twice	simon04	team	"1. Apply mini patch
{{{
#!patch
diff --git a/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java b/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
index 297d81d..8fb8e90 100644
--- a/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
+++ b/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
@@ -36,6 +36,7 @@ public class DeprecatedTags extends Test {
      */
     public DeprecatedTags() {
         super(tr(""Deprecated Tags""), tr(""Checks and corrects deprecated tags.""));
+        new RuntimeException().printStackTrace();
         checks.add(new DeprecationCheck(2101).
                 testAndRemove(""barrier"", ""wire_fence"").
                 add(""barrier"", ""fence"").
}}}

2. Start JOSM, create new data layer, press validate (in validator dialog on the right)

Notice:

{{{
java.lang.RuntimeException
	at org.openstreetmap.josm.data.validation.tests.DeprecatedTags.<init>(DeprecatedTags.java:39)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at java.lang.Class.newInstance(Class.java:433)
	at org.openstreetmap.josm.data.validation.OsmValidator.getAllTestsMap(OsmValidator.java:209)
	at org.openstreetmap.josm.data.validation.OsmValidator.getTests(OsmValidator.java:242)
	at org.openstreetmap.josm.data.validation.OsmValidator.<init>(OsmValidator.java:126)
	at org.openstreetmap.josm.Main$2.call(Main.java:447)
	at org.openstreetmap.josm.Main$2.call(Main.java:434)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:744)
WARNING: Cannot start remotecontrol server on port 8111: Address already in use
INFO: Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console
java.lang.RuntimeException
	at org.openstreetmap.josm.data.validation.tests.DeprecatedTags.<init>(DeprecatedTags.java:39)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at java.lang.Class.newInstance(Class.java:433)
	at org.openstreetmap.josm.data.validation.OsmValidator.getAllTestsMap(OsmValidator.java:209)
	at org.openstreetmap.josm.data.validation.OsmValidator.getTests(OsmValidator.java:242)
	at org.openstreetmap.josm.data.validation.OsmValidator.getEnabledTests(OsmValidator.java:246)
	at org.openstreetmap.josm.actions.ValidateAction.doValidate(ValidateAction.java:72)
	at org.openstreetmap.josm.actions.ValidateAction.actionPerformed(ValidateAction.java:53)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6527)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
	at java.awt.Component.processEvent(Component.java:6292)
	at java.awt.Container.processEvent(Container.java:2235)
	at java.awt.Component.dispatchEventImpl(Component.java:4883)
	at java.awt.Container.dispatchEventImpl(Container.java:2293)
	at java.awt.Component.dispatchEvent(Component.java:4705)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4877)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
	at java.awt.Container.dispatchEventImpl(Container.java:2279)
	at java.awt.Window.dispatchEventImpl(Window.java:2739)
	at java.awt.Component.dispatchEvent(Component.java:4705)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
	at java.awt.EventQueue.access$400(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:697)
	at java.awt.EventQueue$3.run(EventQueue.java:691)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:719)
	at java.awt.EventQueue$4.run(EventQueue.java:717)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
INFO: Test 'Duplicated relations' completed in 0 ms
INFO: Test 'Similarly named ways' completed in 0 ms
INFO: Test 'Opening hours syntax' completed in 0 ms
INFO: Test 'Crossing ways.' completed in 0 ms
INFO: Test 'Tag checker' completed in 0 ms
INFO: Test 'Self-intersecting ways' completed in 0 ms
INFO: Test 'Deprecated Tags' completed in 0 ms
INFO: Test 'Addresses' completed in 0 ms
INFO: Test 'Highways' completed in 0 ms
INFO: Test 'Power lines' completed in 0 ms
INFO: Test 'Way connected to Area' completed in 0 ms
INFO: Test 'Multipolygon' completed in 1 ms
java.lang.RuntimeException
	at org.openstreetmap.josm.data.validation.tests.DeprecatedTags.<init>(DeprecatedTags.java:39)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at java.lang.Class.newInstance(Class.java:433)
	at org.openstreetmap.josm.data.validation.OsmValidator.getAllTestsMap(OsmValidator.java:209)
	at org.openstreetmap.josm.data.validation.OsmValidator.getTests(OsmValidator.java:242)
	at org.openstreetmap.josm.data.validation.OsmValidator.getEnabledTests(OsmValidator.java:246)
	at org.openstreetmap.josm.data.validation.tests.MultipolygonTest.startTest(MultipolygonTest.java:75)
	at org.openstreetmap.josm.actions.ValidateAction$ValidationTask.realRun(ValidateAction.java:170)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:744)
INFO: Test 'Duplicated nodes' completed in 1 ms
INFO: Test 'Unconnected ways' completed in 0 ms
INFO: Test 'Overlapping ways' completed in 0 ms
INFO: Test 'Building inside building' completed in 1 ms
INFO: Test 'Wrongly Ordered Ways' completed in 0 ms
INFO: Test 'Barriers and entrances' completed in 0 ms
INFO: Test 'Overlapping Areas' completed in 1 ms
INFO: Test 'Nodes with same name' completed in 0 ms
INFO: Test 'Unclosed Ways' completed in 0 ms
INFO: Test 'Coastlines' completed in 0 ms
INFO: Test 'Duplicated way nodes' completed in 0 ms
INFO: Test 'Duplicated ways' completed in 1 ms
INFO: Test 'Untagged and unconnected nodes' completed in 0 ms
INFO: Test 'Missing name:* translation' completed in 0 ms
INFO: Test 'Nodes duplicating way tags' completed in 0 ms
INFO: Test 'Turnrestrictions' completed in 0 ms
INFO: Test 'Relation checker' completed in 0 ms
INFO: Test 'Untagged, empty and one node ways' completed in 0 ms
}}}

Tested w/ new JOSM profile, this is the status report:
{{{
Revision: 6470
Is-Local-Build: true
Build-Date: 2013-12-10 23:47:53

Identification: JOSM/1.5 (6470 SVN en_GB) Linux Arch Linux
Memory Usage: 65 MB / 3504 MB (21 MB allocated, but free)
Java version: 1.8.0-ea, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Djosm.home=/tmp/.josm, -Didea.launcher.port=7536, -Didea.launcher.bin.path=/usr/share/intellijidea-ce/bin, -Dfile.encoding=UTF-8]
Program arguments: [--set=expert=true, --set=remotecontrol.enabled=true, --set=debug.edt-checker.enable=true]
Dataset consistency test: No problems found
}}}"	defect	closed	major	13.12	Core validator		fixed		
