Changeset 17770 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java
r15983 r17770 10 10 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference; 11 11 import org.openstreetmap.josm.gui.mappaint.StyleKeys; 12 import org.openstreetmap.josm.tools.Logging; 12 13 13 14 /** … … 91 92 Object value; 92 93 if (val instanceof Expression) { 93 value = ((Expression) val).evaluate(env); 94 try { 95 value = ((Expression) val).evaluate(env); 96 } catch (RuntimeException ex) { 97 Logging.error(ex); 98 value = null; 99 } 94 100 } else { 95 101 value = val; -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
r17769 r17770 721 721 assertEquals("Error at line 1, column 17: Invalid pseudo class specified: foobar", sheet.getErrors().iterator().next().getMessage()); 722 722 } 723 724 /** 725 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/20757">Bug #20757</a>. 726 */ 727 @Test 728 void testTicket20757() { 729 MapCSSStyleSource source = new MapCSSStyleSource("node {name: osm_user_name()}"); 730 source.loadStyleSource(); 731 MultiCascade mc = new MultiCascade(); 732 source.apply(mc, OsmUtils.createPrimitive("node"), 20, false); 733 assertNull(mc.getCascade(null).get("name")); 734 } 723 735 }
Note:
See TracChangeset
for help on using the changeset viewer.