Ignore:
Timestamp:
2017-12-06T18:55:54+01:00 (2 years ago)
Author:
Don-vip
Message:

fix #15641 - avoid CCE in MapCSSTagChecker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r12975 r13195  
    2424import java.util.Map;
    2525import java.util.Objects;
     26import java.util.Optional;
    2627import java.util.Set;
    2728import java.util.function.Predicate;
     
    311312                    try {
    312313                        final String val = ai.val instanceof Expression
    313                                 ? (String) ((Expression) ai.val).evaluate(new Environment())
     314                                ? Optional.of(((Expression) ai.val).evaluate(new Environment())).map(Object::toString).orElse(null)
    314315                                : ai.val instanceof String
    315316                                ? (String) ai.val
Note: See TracChangeset for help on using the changeset viewer.