Modify

Opened 7 years ago

Closed 7 years ago

#15641 closed defect (fixed)

ClassCastException: java.base/java.lang.Integer cannot be cast to java.base/java.lang.String

Reported by: naoliv Owned by: team
Priority: normal Milestone: 17.12
Component: Core validator Version:
Keywords: Cc:

Description

I was testing some validator rules when I got this:

java.lang.ClassCastException: java.base/java.lang.Integer cannot be cast to java.base/java.lang.String
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$TagCheck.ofMapCSSRule(MapCSSTagChecker.java:313)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$TagCheck.readMapCSS(MapCSSTagChecker.java:390)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.addMapCSS(MapCSSTagChecker.java:743)
	at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.reloadRule(MapCSSTagChecker.java:845)
	at org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:147)
	at java.base/java.lang.Thread.run(Thread.java:844)

The wrong rule:

relation[type=public_transport][public_transport=stop_area_group] > way {
         throwWarning: eval(count(parent_tags(public_transport)));
}

JOSM:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-12-05 00:58:56 +0100 (Tue, 05 Dec 2017)
Revision:13194
Build-Date:2017-12-05 02:33:31
URL:http://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (13194 pt_BR) Linux Debian GNU/Linux testing (buster)
Memory Usage: 876 MB / 7168 MB (634 MB allocated, but free)
Java version: 9.0.1+11-Debian-1, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-9-jre:amd64-9.0.1+11-1
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
VM arguments: [--add-modules=java.activation,java.se.ee, -Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Attachments (0)

Change History (5)

comment:1 by Don-vip, 7 years ago

how do you launch JOSM?

comment:2 by naoliv, 7 years ago

java --add-modules java.activation,java.se.ee -jar ~/josm/josm-latest.jar

comment:3 by naoliv, 7 years ago

But the problem here isn't because I used throwWarning: eval(count(parent_tags(public_transport))); instead throwWarning: tr("{0}", eval(count(parent_tags(public_transport))));?

comment:4 by Don-vip, 7 years ago

Milestone: 17.12

Yes, you're right. I can fix this :)

comment:5 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 13195/josm:

fix #15641 - avoid CCE in MapCSSTagChecker

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.