logger.error("Problem loading SUPPLY_PG_CLASS-" + supplyClassPGStr + "- exeception: " + e); logger.error(errorString);
if (logger.isErrorEnabled()) { logger.error("Problem loading SUPPLY_PG_CLASS-" + supplyClassPGStr + "- exeception: " + e); } if (logger.isErrorEnabled()) { logger.error(errorString); }
  private HashMap readParameters() {    final String errorString = "DemandForecastPlugin requires 2 parameters, Supply Type and associated SupplyPGClass.  Additional parameter to change expander module.  e.g. org.cougaar.logistics.plugin.inventory.DemandForecastPlugin(" +        SUPPLY_TYPE + "=BulkPOL, " + SUPPLY_PG_CLASS + "=FuelConsumerPG); Default package for SUPPLY_PG_CLASS is org.cougaar.logistics.ldm.asset.   If PG is not in this package use fully qualified name.";    Collection p = getParameters();    if (p.isEmpty()) {      if (logger.isErrorEnabled()) {        logger.error(errorString);      }      return null;    }    HashMap map = new HashMap();    int idx;    for (Iterator i = p.iterator(); i.hasNext();) {      String s = (String) i.next();      if ((idx = s.indexOf('=')) != -1) {        String key = new String(s.substring(0, idx));        String value = new String(s.substring(idx + 1, s.length()));        map.put(key.trim(), value.trim());      }    }    supplyType = (String) map.get(SUPPLY_TYPE);    String supplyClassPGStr = (String) map.get(SUPPLY_PG_CLASS);    if (((supplyType == null) ||        (supplyClassPGStr == null) ||        (supplyClassPGStr.trim().equals(""))        && logger.isErrorEnabled())) {      logger.error(errorString);    } else {      if (supplyClassPGStr.indexOf(".") == -1) {        supplyClassPGStr = "org.cougaar.logistics.ldm.asset." + supplyClassPGStr;      }      try {        supplyClassPG = Class.forName(supplyClassPGStr);      } catch (Exception e) {        logger.error("Problem loading SUPPLY_PG_CLASS-" + supplyClassPGStr +                     "- exeception: " + e);        logger.error(errorString);        supplyClassPG = null;      }    }    return map;  }