1. opensymphony
  2. oscache


ltor...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed aa87a41

Avoid Date object creation.
Submitted by: Lars Torunski

  • Participants
  • Parent commits 6564f1a
  • Branches default

Comments (0)

Files changed (1)

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

View file
  • Ignore whitespace
         // 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);