changeset 2145:3c61edecf44f

6912866: (date) java.util.Date.before / after may be expensive Reviewed-by: peytoia
author okutsu
date Tue, 26 Jan 2010 15:42:06 +0900
parents eba0ff97a252
children e7127f3fa2f4
files src/share/classes/java/util/Date.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Date.java	Thu Jan 21 21:53:15 2010 +0300
+++ b/src/share/classes/java/util/Date.java	Tue Jan 26 15:42:06 2010 +0900
@@ -953,7 +953,7 @@
      * without affecting its internal state.
      */
     static final long getMillisOf(Date date) {
-        if (date.cdate == null) {
+        if (date.cdate == null || date.cdate.isNormalized()) {
             return date.fastTime;
         }
         BaseCalendar.Date d = (BaseCalendar.Date) date.cdate.clone();