Ignore:
Timestamp:
2013-08-02T23:14:44+02:00 (11 years ago)
Author:
Don-vip
Message:

see #8902 - Small performance enhancements / coding style (patch by shinigami):

  • effective double comparison
  • new Date().getTime() => System.currentTimeMillis()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r6087 r6102  
    1010import java.util.Arrays;
    1111import java.util.Collection;
    12 import java.util.Date;
    1312import java.util.HashMap;
    1413import java.util.Map;
     
    151150                        String rangeA2 = rangeA[1].trim();
    152151                        long minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime(); // if min timestap is empty: use lowest possible date
    153                         long maxDate = rangeA2.isEmpty() ? new Date().getTime() : DateUtils.fromString(rangeA2).getTime(); // if max timestamp is empty: use "now"
     152                        long maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime(); // if max timestamp is empty: use "now"
    154153                        return new TimestampRange(minDate, maxDate);
    155154                    } else
Note: See TracChangeset for help on using the changeset viewer.