Skip to content
Snippets Groups Projects
Commit b1d825f4 authored by adityab3's avatar adityab3
Browse files

[code smell] simplified while loop boolean in getEpidemicStatsitics

parent b31bc61b
No related branches found
No related tags found
1 merge request!24Code smells iteration 3.1
......@@ -260,7 +260,8 @@ public class ViewDiagnosisStatisticsAction {
cal.set(Calendar.YEAR, startCal.get(Calendar.YEAR)); //cal's year then gets set to start's year
ArrayList<DiagnosisStatisticsBean> dbList = new ArrayList<DiagnosisStatisticsBean>();
while( cal.getTime().before(lower) && cal.get(Calendar.YEAR) != lowerCal.get(Calendar.YEAR)) {
boolean differentYears = cal.get(Calendar.YEAR) != lowerCal.get(Calendar.YEAR);
while( cal.getTime().before(lower) && differentYears) {
dbList.add( diagnosesDAO.getCountForWeekOf(icdCode, zip, cal.getTime()) );
cal.add(Calendar.YEAR, 1);
cal.set(Calendar.WEEK_OF_YEAR, weekOfYr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment