Ignore:
Timestamp:
2013-08-11T21:23:19+02:00 (11 years ago)
Author:
Don-vip
Message:

see #8902 - fix compilation warnings

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java

    r6070 r6142  
    147147            return (float[]) o;
    148148        if (o instanceof List) {
    149             List l = (List) o;
     149            List<?> l = (List<?>) o;
    150150            float[] a = new float[l.size()];
    151151            for (int i=0; i<l.size(); ++i) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r5714 r6142  
    131131        }
    132132
    133         public static Object get(List objects, float index) {
     133        public static Object get(List<? extends Object> objects, float index) {
    134134            int idx = Math.round(index);
    135135            if (idx >= 0 && idx < objects.size()) {
     
    139139        }
    140140
    141         public static List split(String sep, String toSplit) {
     141        public static List<String> split(String sep, String toSplit) {
    142142            return Arrays.asList(toSplit.split(Pattern.quote(sep), -1));
    143143        }
     
    265265        }
    266266
    267         @SuppressWarnings(value = "unchecked")
    268267        public static boolean equal(Object a, Object b) {
    269268            // make sure the casts are done in a meaningful way, so
    270269            // the 2 objects really can be considered equal
    271             for (Class klass : new Class[]{Float.class, Boolean.class, Color.class, float[].class, String.class}) {
     270            for (Class<?> klass : new Class[]{Float.class, Boolean.class, Color.class, float[].class, String.class}) {
    272271                Object a2 = Cascade.convertTo(a, klass);
    273272                Object b2 = Cascade.convertTo(b, klass);
     
    317316        }
    318317
    319         public static List regexp_match(String pattern, String target, String flags) {
     318        public static List<String> regexp_match(String pattern, String target, String flags) {
    320319            int f = 0;
    321320            if (flags.contains("i")) {
     
    340339        }
    341340
    342         public static List regexp_match(String pattern, String target) {
     341        public static List<String> regexp_match(String pattern, String target) {
    343342            Matcher m = Pattern.compile(pattern).matcher(target);
    344343            if (m.matches()) {
     
    480479        @Override
    481480        public Object evaluate(Environment env) {
    482             List l = Cascade.convertTo(arg.evaluate(env), List.class);
     481            List<?> l = Cascade.convertTo(arg.evaluate(env), List.class);
    483482            if (l != null)
    484483                return l.size();
Note: See TracChangeset for help on using the changeset viewer.