Ignore:
Timestamp:
2020-05-14T14:21:56+02:00 (5 years ago)
Author:
gerdp
Message:

see #josm19232: IAE: Cannot format given Object as a Date
use 1970 and current date as start and end if file doesn't contain timestamps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java

    r35066 r35444  
    121121            return;
    122122
    123         start = new Date();
    124         end = new Date(0L);
     123        start = new Date(0L);
     124        end = new Date();
    125125        this.minHeight = Integer.MAX_VALUE;
    126126        this.maxHeight = Integer.MIN_VALUE;
     
    196196    protected void setStart(WayPoint wp) {
    197197        importantWayPoints[WAYPOINT_START] = wp;
    198         this.start = wp.getDate();
     198        if(wp.getDate() != null)
     199                this.start = wp.getDate();
    199200    }
    200201
     
    204205    protected void setEnd(WayPoint wp) {
    205206        importantWayPoints[WAYPOINT_END] = wp;
    206         this.end = wp.getDate();
     207        if(wp.getDate() != null)
     208                this.end = wp.getDate();
    207209    }
    208210
Note: See TracChangeset for help on using the changeset viewer.