Map packeddata = (Map)request.getAttribute(“packeddata”);
List years = new ArrayList();
while(packeddata.keySet().iterator().hasNext()){
Integer year = (Integer)packeddata.keySet().iterator().next();
years.add(year);
}
List years = new ArrayList();
while(packeddata.keySet().iterator().hasNext()){
Integer year = (Integer)packeddata.keySet().iterator().next();
years.add(year);
}
이걸….
이걸루
바꾸다
Map packeddata = (Map)request.getAttribute(“packeddata”);
List years = new ArrayList();
Iterator iterator = packeddata.keySet().iterator();
while(iterator.hasNext()){
Integer year = (Integer)iterator.next();
years.add(year);
}
List years = new ArrayList();
Iterator iterator = packeddata.keySet().iterator();
while(iterator.hasNext()){
Integer year = (Integer)iterator.next();
years.add(year);
}
while 문 돌때마다 생성되는 객체가 무수히 많아져서 OutOfMemory 에러가 나더군요..
음…
그래서 아래와 같이 변환…짠.~~~
역시 멍청하게 코딩하면 안되는거군요..
멍청한 코딩 by from __future__ import dream is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.