Commits

Anonymous committed aa87a41

Avoid Date object creation.
Submitted by: Lars Torunski

Comments (0)

Files changed (1)

src/java/com/opensymphony/oscache/util/FastCronParser.java

         // It would be nice to get rid of the Calendar class for speed, but it's a lot of work...
         // We create this
         Calendar cal = new GregorianCalendar();
-        cal.setTime(new Date(time));
+        cal.setTimeInMillis(time);
 
         int minute = cal.get(Calendar.MINUTE);
         int hour = cal.get(Calendar.HOUR_OF_DAY);