Modify

Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#9382 closed defect (fixed)

Unexpected exception validating data with no node or way selected

Reported by: juanhm Owned by: team
Priority: normal Milestone: 13.12
Component: Core validator Version: tested
Keywords: template_report Cc: juan.hernandez.mohedo@…

Description

What steps will reproduce the problem?

  1. Open the validation window
  2. Deselect any node or way
  3. Perform the data validation

What is the expected result?
Perform the validation

What happens instead?
An unexpected exception

Please provide any additional information below. Attach a screenshot if
possible.

Revision: 6388
Repository Root: http://josm.openstreetmap.de/svn
Last Changed Author: simon04
Last Changed Date: 2013-11-15 22:19:40 +0100 (Fri, 15 Nov 2013)
Build-Date: 2013-11-16 02:34:34
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 6388

Identification: JOSM/1.5 (6388 es) Linux Ubuntu 13.10
Memory Usage: 324 MB / 3556 MB (52 MB allocated, but free)
Java version: 1.8.0-ea, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found


java.lang.RuntimeException: java.lang.IllegalArgumentException: Not expecting class class jdk.nashorn.api.scripting.ScriptObjectMirror
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.checkOpeningHourSyntax(OpeningHourTest.java:180)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.check(OpeningHourTest.java:189)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.check(OpeningHourTest.java:195)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.visit(OpeningHourTest.java:202)
	at org.openstreetmap.josm.data.osm.Node.accept(Node.java:199)
	at org.openstreetmap.josm.data.validation.Test.visit(Test.java:157)
	at org.openstreetmap.josm.actions.ValidateAction$ValidationTask.realRun(ValidateAction.java:171)
	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)
Caused by: java.lang.IllegalArgumentException: Not expecting class class jdk.nashorn.api.scripting.ScriptObjectMirror
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.getList(OpeningHourTest.java:108)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.checkOpeningHourSyntax(OpeningHourTest.java:169)
	... 13 more

Attachments (0)

Change History (3)

comment:1 by simon04, 10 years ago

Resolution: fixed
Status: newclosed

In 6427/josm:

fix #9382 - fix OpeningHourTest under Java 8

Instead of implementing yet another getList() extraction
based on jdk.nashorn.api.scripting.ScriptObjectMirror,
use JavaScript to join warnings to a String and
split that String in Java code afterwards.

Also, don't rely on JavaScript exception to obtain
test errors (due to different string representation),
but catch those exceptions in JavaScript and provide
a getErrors() function.

comment:2 by Don-vip, 10 years ago

Milestone: 13.12 (6502)

comment:3 by stoecker, 7 years ago

Milestone: 13.12 (6502)13.12

Milestone renamed

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.