出错的代码:
出错原因很简单:多用了一次iter.next()!!!
应改为:
Iterator<File> iter = FileUtils.iterateFiles(dicFile, regexFilter, null);
while(iter.hasNext()) {
prePicInfoMap.put(iter.next().getName(), Constant.DISPCONTENT_LOGO_PATH + iter.next().getName());
}
出错原因很简单:多用了一次iter.next()!!!
应改为:
Iterator<File> iter = FileUtils.iterateFiles(dicFile, regexFilter, null);
while(iter.hasNext()) {
String fileName = iter.next().getName();
prePicInfoMap.put(fileName, Constant.DISPCONTENT_LOGO_PATH + fileName);
}