提交 2cf3d9a6 编写于 作者: O okutsu

6912866: (date) java.util.Date.before / after may be expensive

Reviewed-by: peytoia
上级 1752dae0
...@@ -953,7 +953,7 @@ public class Date ...@@ -953,7 +953,7 @@ public class Date
* without affecting its internal state. * without affecting its internal state.
*/ */
static final long getMillisOf(Date date) { static final long getMillisOf(Date date) {
if (date.cdate == null) { if (date.cdate == null || date.cdate.isNormalized()) {
return date.fastTime; return date.fastTime;
} }
BaseCalendar.Date d = (BaseCalendar.Date) date.cdate.clone(); BaseCalendar.Date d = (BaseCalendar.Date) date.cdate.clone();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册