- Timestamp:
- 2013-11-07T11:57:36+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
r6371 r6372 1 1 package org.openstreetmap.josm.data.validation.tests; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 import java.io.InputStreamReader; 6 import java.util.ArrayList; 7 import java.util.Arrays; 8 import java.util.Collections; 9 import java.util.List; 10 11 import javax.script.Invocable; 12 import javax.script.ScriptEngine; 13 import javax.script.ScriptEngineManager; 14 import javax.script.ScriptException; 2 15 3 16 import org.openstreetmap.josm.data.osm.Node; … … 9 22 import org.openstreetmap.josm.data.validation.TestError; 10 23 import 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;27 24 28 25 /** … … 35 32 public class OpeningHourTest extends Test { 36 33 34 /** 35 * Javascript Rhino engine 36 */ 37 37 public static final ScriptEngine ENGINE = new ScriptEngineManager().getEngineByName("rhino"); 38 38 … … 52 52 } 53 53 54 @SuppressWarnings("unchecked")55 54 protected Object parse(String value) throws ScriptException, NoSuchMethodException { 56 55 return ((Invocable) ENGINE).invokeFunction("oh", value); … … 65 64 return Arrays.asList(strings); 66 65 } else if (obj instanceof List) { 67 return (List ) obj;66 return (List<Object>) obj; 68 67 } else { 69 68 throw new IllegalArgumentException("Not expecting class " + obj.getClass());
Note:
See TracChangeset
for help on using the changeset viewer.