jdk/src/java.base/share/classes/java/time/LocalDate.java
changeset 33847 7857fc64d0c0
parent 33831 022f746e1d74
child 34388 ab5f741f776a
--- a/jdk/src/java.base/share/classes/java/time/LocalDate.java	Tue Nov 17 15:29:21 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/time/LocalDate.java	Tue Nov 17 10:44:22 2015 -0500
@@ -81,7 +81,7 @@
 import java.io.ObjectInputStream;
 import java.io.Serializable;
 import java.time.chrono.ChronoLocalDate;
-import java.time.chrono.Era;
+import java.time.chrono.IsoEra;
 import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
@@ -732,15 +732,12 @@
      * Users of this class should typically ignore this method as it exists primarily
      * to fulfill the {@link ChronoLocalDate} contract where it is necessary to support
      * the Japanese calendar system.
-     * <p>
-     * The returned era will be a singleton capable of being compared with the constants
-     * in {@link IsoChronology} using the {@code ==} operator.
      *
-     * @return the {@code IsoChronology} era constant applicable at this date, not null
+     * @return the IsoEra applicable at this date, not null
      */
     @Override // override for Javadoc
-    public Era getEra() {
-        return ChronoLocalDate.super.getEra();
+    public IsoEra getEra() {
+        return (getYear() >= 1 ? IsoEra.CE : IsoEra.BCE);
     }
 
     /**