Commits

timemachine committed b2b037a

Improved DateListSchedule desc.

Comments (0)

Files changed (1)

timemachine-scheduler/src/main/java/timemachine/scheduler/schedule/DateListSchedule.java

 	}
 
 	@Override
-	public String getDesc() {
-		return super.getDesc() + ", nextRunIndex=" + nextRunIndex;
-	}
-
-	@Override
 	public void initOnce() {
 		super.initOnce();
 
 		if (dates.size() == 0)
 			throw new SchedulerException("Failed to init DateListSchedule: the date list is empty.");
 
+		nextRunIndex = 0;
+		nextRun = dates.get(nextRunIndex);
+		
 		if (desc == null) {
 			if (dates.size() <= 10)
 				desc = "DateListSchedule" + dates;
 			else 
 				desc = "DateListSchedule{size=" + dates.size() + "}";
+			desc += ", nextRunIndex=" + nextRunIndex;
+			if (dateListProviderClassName != null)
+				desc += ", dateListProviderClassName=" + dateListProviderClassName;
 		}
-		
-		nextRunIndex = 0;
-		nextRun = dates.get(nextRunIndex);
 	}
 
 	/**