Opened 8 years ago

Closed 8 years ago

#6982 closed defect (fixed)

broken TMS url leads to exceptions

Reported by: alv Owned by: Don-vip
Priority: normal Milestone:
Component: Core Version: latest
Keywords: tms input validation Cc:

Description (last modified by Don-vip)

Steps to reproduce: In preferences, add a TMS layer. Instead of {zoom} you write {z} - a mistake made easily, when you, for example, copied the url from a web page where it was with "$z". Then enable the layer. Result: JOSM complains about unhandled exceptions several times in a row - and later every time the view changes:

java.lang.IllegalArgumentException: can't parse argument number z
	at java.text.MessageFormat.makeFormat(
	at java.text.MessageFormat.applyPattern(
	at java.text.MessageFormat.<init>(
	at java.text.MessageFormat.format(
	at org.openstreetmap.josm.gui.layer.TMSLayer.paintTileText(
	at org.openstreetmap.josm.gui.layer.TMSLayer.paint(
	at org.openstreetmap.josm.gui.MapView.paintLayer(
	at org.openstreetmap.josm.gui.MapView.paint(

What should happen: show an error tile, that the url couldn't be parsed. Or that there's no tile at ".../{zoom}/..."

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by Don-vip

Description: modified (diff)
Owner: changed from team to Don-vip
Status: newassigned

Thanks for your report. I've updated the description to add the raised exception. I look into a fix.

comment:2 Changed 8 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In [4531/josm]:

fix #6982 - broken TMS url leads to exceptions

Modify Ticket

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