Opened 9 years ago

Closed 9 years ago

#10251 closed defect (fixed)

malformed validator rule may cause an exception

Reported by: mkoniecz Owned by: team
Priority: normal Milestone: 14.07
Component: Core validator Version:
Keywords: Cc:

Description (last modified by Don-vip)

Malformed custom validator rule

  fixRemove: foot;
  throwWarning: tr("foot=yes redefines highway=footway that implies foot=designated [my rule]");

Note, it should be:

  fixRemove: "foot";
  throwWarning: tr("foot=yes redefines highway=footway that implies foot=designated [my rule]");

with osm test case:

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='true' generator='JOSM'>
  <bounds minlat='50.0087871' minlon='19.9994516' maxlat='50.0090353' maxlon='19.9996233' origin='CGImap 0.3.3 (23659' />
  <bounds minlat='50.0087871' minlon='19.9994516' maxlat='50.0090353' maxlon='19.9996233' origin='OpenStreetMap server' />
  <bounds minlat='50.0087574' minlon='19.9994516' maxlat='50.0087871' maxlon='19.9996233' origin='CGImap 0.3.3 (23661' />
  <bounds minlat='50.0087574' minlon='19.9994516' maxlat='50.0087871' maxlon='19.9996233' origin='OpenStreetMap server' />
  <bounds minlat='50.0090353' minlon='19.9992177' maxlat='50.009065' maxlon='19.9998572' origin='CGImap 0.3.3 (23682' />
  <bounds minlat='50.0090353' minlon='19.9992177' maxlat='50.009065' maxlon='19.9998572' origin='OpenStreetMap server' />
  <bounds minlat='50.0087574' minlon='19.9992177' maxlat='50.0090353' maxlon='19.9994516' origin='CGImap 0.3.3 (31621' />
  <bounds minlat='50.0087574' minlon='19.9992177' maxlat='50.0090353' maxlon='19.9994516' origin='OpenStreetMap server' />
  <bounds minlat='50.0087574' minlon='19.9996233' maxlat='50.0090353' maxlon='19.9998572' origin='CGImap 0.3.3 (31427' />
  <bounds minlat='50.0087574' minlon='19.9996233' maxlat='50.0090353' maxlon='19.9998572' origin='OpenStreetMap server' />
  <node id='-4357' action='modify' visible='true' lat='50.00894925748' lon='19.99957671389' />
  <node id='-4356' action='modify' visible='true' lat='50.00895173948' lon='19.9994003482' />
  <way id='-4358' action='modify' visible='true'>
    <nd ref='-4356' />
    <nd ref='-4357' />
    <tag k='foot' v='yes' />
    <tag k='highway' v='footway' />

on running validation caused

Repository Root:
Build-Date: 2014-07-09 01:37:29
Last Changed Author: bastiK
Revision: 7296
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Date: 2014-07-08 18:49:07 +0200 (Tue, 08 Jul 2014)
Last Changed Rev: 7296

Identification: JOSM/1.5 (7296 en) Windows 7 32-Bit
Memory Usage: 58 MB / 247 MB (9 MB allocated, but free)
Java version: 1.7.0_55, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (30416)
Plugin: RoadSigns (30495)
Plugin: buildings_tools (30485)
Plugin: continuosDownload (28565)
Plugin: measurement (30416)
Plugin: notes (v0.9.2)
Plugin: turnrestrictions (30454)
Plugin: wikipedia (30449)

	at org.openstreetmap.josm.actions.ValidateAction$ValidationTask.realRun(
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(
	at java.util.concurrent.Executors$ Source)
	at Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$ Source)
	at Source)

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by Don-vip

Description: modified (diff)

comment:2 Changed 9 years ago by Don-vip

Milestone: 14.07

comment:3 Changed 9 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 7300/josm:

fix #10251 - NPE with malformed validator rule (invalid fixAdd/fixRemove)

Modify Ticket

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