printError("No scheduled content");
if (logger.isErrorEnabled()) { logger.error("No scheduled content"); }
    private void removeTasks(Enumeration tasks) {        Map tMap = new HashMap();        while (tasks.hasMoreElements()) {            Task task = (Task) tasks.nextElement();            if (!task.isDeleted()) { // Rescind requires no special handling                continue;            }            Asset proto = (Asset) task.getDirectObject();	    Inventory inventory = inventoryPlugin_.findOrMakeInventory(supplyType_, proto);            if (inventory == null)  {		String typeID = proto.getTypeIdentificationPG().getTypeIdentification();		printError("Inventory NOT found for "+typeID);		continue;	    }            if (DEBUG) printDebug(1000, "Removing task from inventory: " + TaskUtils.taskDesc(task));            long et = TaskUtils.getEndTime(task);            et = TimeUtils.pushToEndOfDay(tCalendar_, et);            DeletionTimeRange dtr = (DeletionTimeRange) tMap.get(inventory);            if (dtr == null) {                dtr = new DeletionTimeRange(et);                tMap.put(inventory, dtr);            } else {                dtr.earliestTime = Math.min(dtr.earliestTime, et);                dtr.latestTime = Math.max(dtr.latestTime, et);            }        }        long inventoryReportCutoffTime = plugin_.currentTimeMillis() - INVENTORY_REPORT_CUTOFF;        long inventoryReportPruneTime = plugin_.currentTimeMillis() - INVENTORY_REPORT_PRUNE;        for (Iterator keys = tMap.keySet().iterator(); keys.hasNext(); ) {            boolean needPublishChange = false;            Inventory inventory = (Inventory) keys.next();            InventoryPG invpg =                (InventoryPG) inventory.getInventoryPG();            DeletionTimeRange dtr = (DeletionTimeRange) tMap.get(inventory);            Schedule schedule =                inventory.getScheduledContentPG().getSchedule();            ItemIdentificationPG iipg = inventory.getItemIdentificationPG();            String iid = iipg.getItemIdentification();            long et;            if (true) {                et = dtr.earliestTime;            } else {                et = dtr.latestTime;            }            for (; et <= dtr.latestTime; et += TimeUtils.MSEC_PER_DAY) {                Iterator iter = schedule.getScheduleElementsWithTime(et).iterator();                if (iter.hasNext()) { // There should be exactly one element                    QuantityScheduleElement qse = (QuantityScheduleElement) iter.next();                    double q = qse.getQuantity();                    if (DEBUG) printDebug(1000,                               "Adding inventory report to "                               + inventory                               + " at "                               + new java.util.Date(et)                               + " level "                               + q);                    invpg.addInventoryReport(new InventoryReport(iid, et, et, q));                    needPublishChange = true;                } else {                    printError("No scheduled content");                }            }            if (INVENTORY_REPORT_PRUNE > 0L) {                InventoryReport oldestReport = invpg.getOldestInventoryReport();                if (oldestReport != null && oldestReport.theReportDate < inventoryReportCutoffTime) {                    if (DEBUG) printDebug(1000, "Pruning old inventoryReports: " + inventory);                    invpg.pruneOldInventoryReports(inventoryReportPruneTime);                    needPublishChange = true;                }                if (needPublishChange) {                    publishChangeAsset(inventory);                }            }        }    }