--- a/jdk/src/share/classes/java/time/chrono/MinguoDate.java Thu Jul 18 10:49:08 2013 -0700
+++ b/jdk/src/share/classes/java/time/chrono/MinguoDate.java Thu Jul 18 11:02:02 2013 -0700
@@ -96,7 +96,7 @@
*/
public final class MinguoDate
extends ChronoDateImpl<MinguoDate>
- implements ChronoLocalDate<MinguoDate>, Serializable {
+ implements ChronoLocalDate, Serializable {
/**
* Serialization version.
@@ -152,7 +152,7 @@
* @throws DateTimeException if the current date cannot be obtained
*/
public static MinguoDate now(Clock clock) {
- return MinguoChronology.INSTANCE.date(LocalDate.now(clock));
+ return new MinguoDate(LocalDate.now(clock));
}
/**
@@ -264,7 +264,7 @@
}
return getChronology().range(f);
}
- throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName());
+ throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
}
return field.rangeRefinedBy(this);
}
@@ -325,7 +325,7 @@
}
return with(isoDate.with(field, newValue));
}
- return ChronoLocalDate.super.with(field, newValue);
+ return super.with(field, newValue);
}
/**
@@ -370,6 +370,11 @@
}
@Override
+ MinguoDate plusWeeks(long weeksToAdd) {
+ return super.plusWeeks(weeksToAdd);
+ }
+
+ @Override
MinguoDate plusDays(long days) {
return with(isoDate.plusDays(days));
}
@@ -385,11 +390,6 @@
}
@Override
- MinguoDate plusWeeks(long weeksToAdd) {
- return super.plusWeeks(weeksToAdd);
- }
-
- @Override
MinguoDate minusYears(long yearsToSubtract) {
return super.minusYears(yearsToSubtract);
}
@@ -414,13 +414,14 @@
}
@Override // for javadoc and covariant return type
+ @SuppressWarnings("unchecked")
public final ChronoLocalDateTime<MinguoDate> atTime(LocalTime localTime) {
- return super.atTime(localTime);
+ return (ChronoLocalDateTime<MinguoDate>)super.atTime(localTime);
}
@Override
- public Period periodUntil(ChronoLocalDate<?> endDate) {
- return isoDate.periodUntil(endDate);
+ public Period until(ChronoLocalDate endDate) {
+ return isoDate.until(endDate);
}
@Override // override for performance
@@ -458,7 +459,7 @@
out.writeByte(get(DAY_OF_MONTH));
}
- static ChronoLocalDate<?> readExternal(DataInput in) throws IOException {
+ static MinguoDate readExternal(DataInput in) throws IOException {
int year = in.readInt();
int month = in.readByte();
int dayOfMonth = in.readByte();