src/share/classes/java/text/SimpleDateFormat.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


 424     // which version we're compatible with
 425     static final long serialVersionUID = 4774881970558875024L;
 426 
 427     // the internal serial version which says which version was written
 428     // - 0 (default) for version up to JDK 1.1.3
 429     // - 1 for version from JDK 1.1.4, which includes a new field
 430     static final int currentSerialVersion = 1;
 431 
 432     /**
 433      * The version of the serialized data on the stream.  Possible values:
 434      * <ul>
 435      * <li><b>0</b> or not present on stream: JDK 1.1.3.  This version
 436      * has no <code>defaultCenturyStart</code> on stream.
 437      * <li><b>1</b> JDK 1.1.4 or later.  This version adds
 438      * <code>defaultCenturyStart</code>.
 439      * </ul>
 440      * When streaming out this class, the most recent format
 441      * and the highest allowable <code>serialVersionOnStream</code>
 442      * is written.
 443      * @serial
 444      * @since JDK1.1.4
 445      */
 446     private int serialVersionOnStream = currentSerialVersion;
 447 
 448     /**
 449      * The pattern string of this formatter.  This is always a non-localized
 450      * pattern.  May not be null.  See class documentation for details.
 451      * @serial
 452      */
 453     private String pattern;
 454 
 455     /**
 456      * Saved numberFormat and pattern.
 457      * @see SimpleDateFormat#checkNegativeNumberExpression
 458      */
 459     transient private NumberFormat originalNumberFormat;
 460     transient private String originalNumberPattern;
 461 
 462     /**
 463      * The minus sign to be used with format and parse.
 464      */


 489     /**
 490      * Locale dependent digit zero.
 491      * @see #zeroPaddingNumber
 492      * @see java.text.DecimalFormatSymbols#getZeroDigit
 493      */
 494     transient private char zeroDigit;
 495 
 496     /**
 497      * The symbols used by this formatter for week names, month names,
 498      * etc.  May not be null.
 499      * @serial
 500      * @see java.text.DateFormatSymbols
 501      */
 502     private DateFormatSymbols formatData;
 503 
 504     /**
 505      * We map dates with two-digit years into the century starting at
 506      * <code>defaultCenturyStart</code>, which may be any date.  May
 507      * not be null.
 508      * @serial
 509      * @since JDK1.1.4
 510      */
 511     private Date defaultCenturyStart;
 512 
 513     transient private int defaultCenturyStartYear;
 514 
 515     private static final int MILLIS_PER_MINUTE = 60 * 1000;
 516 
 517     // For time zones that have no names, use strings GMT+minutes and
 518     // GMT-minutes. For instance, in France the time zone is GMT+60.
 519     private static final String GMT = "GMT";
 520 
 521     /**
 522      * Cache NumberFormat instances with Locale key.
 523      */
 524     private static final ConcurrentMap<Locale, NumberFormat> cachedNumberFormatData
 525         = new ConcurrentHashMap<>(3);
 526 
 527     /**
 528      * The Locale used to instantiate this
 529      * <code>SimpleDateFormat</code>. The value may be null if this object




 424     // which version we're compatible with
 425     static final long serialVersionUID = 4774881970558875024L;
 426 
 427     // the internal serial version which says which version was written
 428     // - 0 (default) for version up to JDK 1.1.3
 429     // - 1 for version from JDK 1.1.4, which includes a new field
 430     static final int currentSerialVersion = 1;
 431 
 432     /**
 433      * The version of the serialized data on the stream.  Possible values:
 434      * <ul>
 435      * <li><b>0</b> or not present on stream: JDK 1.1.3.  This version
 436      * has no <code>defaultCenturyStart</code> on stream.
 437      * <li><b>1</b> JDK 1.1.4 or later.  This version adds
 438      * <code>defaultCenturyStart</code>.
 439      * </ul>
 440      * When streaming out this class, the most recent format
 441      * and the highest allowable <code>serialVersionOnStream</code>
 442      * is written.
 443      * @serial
 444      * @since 1.1.4
 445      */
 446     private int serialVersionOnStream = currentSerialVersion;
 447 
 448     /**
 449      * The pattern string of this formatter.  This is always a non-localized
 450      * pattern.  May not be null.  See class documentation for details.
 451      * @serial
 452      */
 453     private String pattern;
 454 
 455     /**
 456      * Saved numberFormat and pattern.
 457      * @see SimpleDateFormat#checkNegativeNumberExpression
 458      */
 459     transient private NumberFormat originalNumberFormat;
 460     transient private String originalNumberPattern;
 461 
 462     /**
 463      * The minus sign to be used with format and parse.
 464      */


 489     /**
 490      * Locale dependent digit zero.
 491      * @see #zeroPaddingNumber
 492      * @see java.text.DecimalFormatSymbols#getZeroDigit
 493      */
 494     transient private char zeroDigit;
 495 
 496     /**
 497      * The symbols used by this formatter for week names, month names,
 498      * etc.  May not be null.
 499      * @serial
 500      * @see java.text.DateFormatSymbols
 501      */
 502     private DateFormatSymbols formatData;
 503 
 504     /**
 505      * We map dates with two-digit years into the century starting at
 506      * <code>defaultCenturyStart</code>, which may be any date.  May
 507      * not be null.
 508      * @serial
 509      * @since 1.1.4
 510      */
 511     private Date defaultCenturyStart;
 512 
 513     transient private int defaultCenturyStartYear;
 514 
 515     private static final int MILLIS_PER_MINUTE = 60 * 1000;
 516 
 517     // For time zones that have no names, use strings GMT+minutes and
 518     // GMT-minutes. For instance, in France the time zone is GMT+60.
 519     private static final String GMT = "GMT";
 520 
 521     /**
 522      * Cache NumberFormat instances with Locale key.
 523      */
 524     private static final ConcurrentMap<Locale, NumberFormat> cachedNumberFormatData
 525         = new ConcurrentHashMap<>(3);
 526 
 527     /**
 528      * The Locale used to instantiate this
 529      * <code>SimpleDateFormat</code>. The value may be null if this object