Changeset 6372 in josm for trunk


Ignore:
Timestamp:
2013-11-07T11:57:36+01:00 (11 years ago)
Author:
Don-vip
Message:

fix #9284 - fix compilation

File:
1 edited

Legend:

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

    r6371 r6372  
    11package org.openstreetmap.josm.data.validation.tests;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
     4
     5import java.io.InputStreamReader;
     6import java.util.ArrayList;
     7import java.util.Arrays;
     8import java.util.Collections;
     9import java.util.List;
     10
     11import javax.script.Invocable;
     12import javax.script.ScriptEngine;
     13import javax.script.ScriptEngineManager;
     14import javax.script.ScriptException;
    215
    316import org.openstreetmap.josm.data.osm.Node;
     
    922import org.openstreetmap.josm.data.validation.TestError;
    1023import org.openstreetmap.josm.io.MirroredInputStream;
    11 import sun.org.mozilla.javascript.NativeArray;
    12 
    13 import javax.script.Invocable;
    14 import javax.script.ScriptEngine;
    15 import javax.script.ScriptEngineManager;
    16 import javax.script.ScriptException;
    17 import java.io.InputStreamReader;
    18 import java.text.SimpleDateFormat;
    19 import java.util.ArrayList;
    20 import java.util.Arrays;
    21 import java.util.Collections;
    22 import java.util.Date;
    23 import java.util.List;
    24 import java.util.Map;
    25 
    26 import static org.openstreetmap.josm.tools.I18n.tr;
    2724
    2825/**
     
    3532public class OpeningHourTest extends Test {
    3633
     34    /**
     35     * Javascript Rhino engine
     36     */
    3737    public static final ScriptEngine ENGINE = new ScriptEngineManager().getEngineByName("rhino");
    3838
     
    5252    }
    5353
    54     @SuppressWarnings("unchecked")
    5554    protected Object parse(String value) throws ScriptException, NoSuchMethodException {
    5655        return ((Invocable) ENGINE).invokeFunction("oh", value);
     
    6564            return Arrays.asList(strings);
    6665        } else if (obj instanceof List) {
    67             return (List) obj;
     66            return (List<Object>) obj;
    6867        } else {
    6968            throw new IllegalArgumentException("Not expecting class " + obj.getClass());
Note: See TracChangeset for help on using the changeset viewer.