Modify ↓
Opened 9 years ago
Closed 6 years ago
#12105 closed defect (duplicate)
PatternSyntaxException with invalid MapCSS
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | mapcss | Cc: |
Description
I was testing this (wrong) test:
*[/_{1,2,3}$/] { throwError: tr("chave inválida: {0}", "{0.key}"); }
And JOSM gave an error:
ERRO: java.util.regex.PatternSyntaxException: Unclosed counted closure near index 5 _{1,2,3}$ ^ java.util.regex.PatternSyntaxException: Unclosed counted closure near index 5 _{1,2,3}$ ^ at java.util.regex.Pattern.error(Pattern.java:1955) at java.util.regex.Pattern.closure(Pattern.java:3141) at java.util.regex.Pattern.sequence(Pattern.java:2134) at java.util.regex.Pattern.expr(Pattern.java:1996) at java.util.regex.Pattern.compile(Pattern.java:1696) at java.util.regex.Pattern.<init>(Pattern.java:1351) at java.util.regex.Pattern.compile(Pattern.java:1028) at org.openstreetmap.josm.gui.mappaint.mapcss.Condition$KeyCondition.<init>(Condition.java:441) at org.openstreetmap.josm.gui.mappaint.mapcss.Condition.createKeyCondition(Condition.java:66) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.simple_key_condition(MapCSSParser.java:1256) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.condition(MapCSSParser.java:1137) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.selector(MapCSSParser.java:1062) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.child_selector(MapCSSParser.java:908) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.selectors(MapCSSParser.java:880) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.rule(MapCSSParser.java:871) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.sheet(MapCSSParser.java:855) at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$TagCheck.readMapCSS(MapCSSTagChecker.java:354) at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.addMapCSS(MapCSSTagChecker.java:708) at org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:143) at org.openstreetmap.josm.io.FileWatcher.access$000(FileWatcher.java:30) at org.openstreetmap.josm.io.FileWatcher$1.run(FileWatcher.java:46) at java.lang.Thread.run(Thread.java:745)
JOSM:
Revision: 9015 Repository Root: http://josm.openstreetmap.de/svn Relative URL: ^/trunk Last Changed Author: Don-vip Last Changed Date: 2015-11-16 03:23:57 +0100 (Mon, 16 Nov 2015) Build-Date: 2015-11-16 02:34:08 URL: http://josm.openstreetmap.de/svn/trunk Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last Changed Rev: 9015 Identification: JOSM/1.5 (9015 pt_BR) Linux Debian GNU/Linux testing (stretch) Memory Usage: 1507 MB / 9102 MB (687 MB allocated, but free) Java version: 1.8.0_72-internal, Oracle Corporation, OpenJDK 64-Bit Server VM VM arguments: [-Dawt.useSystemAAFontSettings=on] Dataset consistency test: No problems found Plugins: - Create_grid_of_ways (31603) - OpeningHoursEditor (31696) - PicLayer (31694) - RoadSigns (31694) - SimplifyArea (31694) - apache-commons (31718) - buildings_tools (31694) - conflation (0.1.8) - contourmerge (1014) - download_along (31603) - editgpx (31603) - ejml (31756) - geotools (31755) - imagery_offset_db (31694) - importvec (31694) - jts (31603) - log4j (31603) - measurement (31694) - merge-overlap (31732) - opendata (31695) - pbf (31694) - pdfimport (31694) - poly (31694) - reverter (31694) - scripting (30722) - todo (29154) - turnrestrictions (31694) - undelete (31603) - utilsplugin2 (31694) Last errors/warnings: - E: java.util.regex.PatternSyntaxException: Unclosed counted closure near index 5
Attachments (0)
Note:
See TracTickets
for help on using tickets.
Closed as duplicate of #14368.