Search in sources :

Example 1 with IONoSuchElementException

use of net.sourceforge.processdash.log.time.IONoSuchElementException in project processdash by dtuma.

the class EVCalculatorData method saveActualScheduleTime.

private void saveActualScheduleTime(TimeLog log) throws IOException {
    try {
        Date start = rezeroAtStartDate ? scheduleStartDate : null;
        Iterator entries = log.filter(null, start, null);
        while (entries.hasNext()) saveActualScheduleTime((TimeLogEntry) entries.next());
    } catch (IONoSuchElementException ion) {
        throw ion.getIOException();
    }
}
Also used : IONoSuchElementException(net.sourceforge.processdash.log.time.IONoSuchElementException) TimeLogEntry(net.sourceforge.processdash.log.time.TimeLogEntry) Iterator(java.util.Iterator) Date(java.util.Date)

Example 2 with IONoSuchElementException

use of net.sourceforge.processdash.log.time.IONoSuchElementException in project processdash by dtuma.

the class EVCalculatorData method saveActualPreTime.

private void saveActualPreTime(TimeLog log) throws IOException {
    try {
        Iterator entries = log.filter(null, null, scheduleStartDate);
        while (entries.hasNext()) {
            TimeLogEntry entry = (TimeLogEntry) entries.next();
            Date d = entry.getStartTime();
            if (d == null || d.compareTo(scheduleStartDate) >= 0)
                continue;
            EVTask task = taskRoot.getTaskForPath(entry.getPath());
            if (task != null && !task.isLevelOfEffortTask())
                task.actualPreTime += entry.getElapsedTime();
        }
    } catch (IONoSuchElementException ion) {
        throw ion.getIOException();
    }
}
Also used : IONoSuchElementException(net.sourceforge.processdash.log.time.IONoSuchElementException) TimeLogEntry(net.sourceforge.processdash.log.time.TimeLogEntry) Iterator(java.util.Iterator) Date(java.util.Date)

Aggregations

Date (java.util.Date)2 Iterator (java.util.Iterator)2 IONoSuchElementException (net.sourceforge.processdash.log.time.IONoSuchElementException)2 TimeLogEntry (net.sourceforge.processdash.log.time.TimeLogEntry)2