return false;
}
String symbol = stripQuotes(values[0]);
Security security = requested.remove(symbol);
if (security == null)
{
errors.add(new IOException(MessageFormat.format(Messages.MsgUnexpectedSymbol, symbol, line)));
continue;
}
long lastTrade = asPrice(values[1]);
Date lastTradeDate = asDate(values[2]);
if (lastTradeDate == null) // can't work w/o date
lastTradeDate = Dates.today();
long daysHigh = asPrice(values[3]);
long daysLow = asPrice(values[4]);
long previousClose = asPrice(values[5]);
int volume = asNumber(values[6]);
LatestSecurityPrice price = new LatestSecurityPrice(lastTradeDate, lastTrade);
price.setHigh(daysHigh);
price.setLow(daysLow);
price.setPreviousClose(previousClose);
price.setVolume(volume);
boolean isAdded = security.setLatest(price);
isUpdated = isUpdated || isAdded;
}
for (Security s : requested.values())
errors.add(new IOException(MessageFormat.format(Messages.MsgMissingResponse, s.getTickerSymbol())));