jdk/src/share/classes/java/time/temporal/JulianFields.java
changeset 19030 32f129cb6351
parent 17474 8c100beabcc0
child 20793 5acd4b8d70a1
--- a/jdk/src/share/classes/java/time/temporal/JulianFields.java	Thu Jul 18 10:49:08 2013 -0700
+++ b/jdk/src/share/classes/java/time/temporal/JulianFields.java	Thu Jul 18 11:02:02 2013 -0700
@@ -66,6 +66,9 @@
 import static java.time.temporal.ChronoUnit.FOREVER;
 
 import java.time.DateTimeException;
+import java.time.ZoneId;
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.Chronology;
 import java.time.format.ResolverStyle;
 import java.util.Collections;
 import java.util.Map;
@@ -233,11 +236,6 @@
 
         //-----------------------------------------------------------------------
         @Override
-        public String getName() {
-            return name;
-        }
-
-        @Override
         public TemporalUnit getBaseUnit() {
             return baseUnit;
         }
@@ -253,6 +251,11 @@
         }
 
         @Override
+        public boolean isTimeBased() {
+            return false;
+        }
+
+        @Override
         public ValueRange range() {
             return range;
         }
@@ -287,15 +290,14 @@
 
         //-----------------------------------------------------------------------
         @Override
-        public Map<TemporalField, Long> resolve(TemporalAccessor temporal, long value, ResolverStyle resolverStyle) {
-            long epochDay;
+        public ChronoLocalDate resolve(
+                Map<TemporalField, Long> fieldValues, Chronology chronology, ZoneId zone, ResolverStyle resolverStyle) {
+            long value = fieldValues.remove(this);
             if (resolverStyle == ResolverStyle.LENIENT) {
-                epochDay = Math.subtractExact(value, offset);
-            } else {
-                range().checkValidValue(value, this);
-                epochDay = value - offset;
+                return chronology.dateEpochDay(Math.subtractExact(value, offset));
             }
-            return Collections.<TemporalField, Long>singletonMap(EPOCH_DAY, epochDay);
+            range().checkValidValue(value, this);
+            return chronology.dateEpochDay(value - offset);
         }
 
         //-----------------------------------------------------------------------