private Date extrapolateStartTimeFromScanRanges ( List < ScanRangeStatus > pendingScanRanges , List < ScanRangeStatus > activeScanRanges , List < ScanRangeStatus > completeScanRanges ) { Date startTime = null ; for ( ScanRangeStatus status : Iterables . concat ( pendingScanRanges , activeScanRanges , completeScanRanges ) ) { Date queuedTime = status . getScanQueuedTime ( ) ; if ( queuedTime != null && ( startTime == null || queuedTime . before ( startTime ) ) ) { startTime = queuedTime ; } } if ( startTime == null ) { // Either the scan contained no scan ranges or no scans were ever queued, neither of which is likely to // ever happen. But, so we don't return null choose a reasonably old date. startTime = new Date ( 0 ) ; } return startTime ; }
For grandfathered in ScanStatuses that did not include a startTime attribute extrapolate it as the earliest time a scan range was queued .