< prev index next >

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

Print this page
rev 47480 : [mq]: 8176841


 655         numberFormat = cachedNumberFormatData.get(loc);
 656         if (numberFormat == null) { /* cache miss */
 657             numberFormat = NumberFormat.getIntegerInstance(loc);
 658             numberFormat.setGroupingUsed(false);
 659 
 660             /* update cache */
 661             cachedNumberFormatData.putIfAbsent(loc, numberFormat);
 662         }
 663         numberFormat = (NumberFormat) numberFormat.clone();
 664 
 665         initializeDefaultCentury();
 666     }
 667 
 668     private void initializeCalendar(Locale loc) {
 669         if (calendar == null) {
 670             assert loc != null;
 671             // The format object must be constructed using the symbols for this zone.
 672             // However, the calendar should use the current default TimeZone.
 673             // If this is not contained in the locale zone strings, then the zone
 674             // will be formatted using generic GMT+/-H:MM nomenclature.
 675             calendar = Calendar.getInstance(TimeZone.getDefault(), loc);
 676         }
 677     }
 678 
 679     /**
 680      * Returns the compiled form of the given pattern. The syntax of
 681      * the compiled pattern is:
 682      * <blockquote>
 683      * CompiledPattern:
 684      *     EntryList
 685      * EntryList:
 686      *     Entry
 687      *     EntryList Entry
 688      * Entry:
 689      *     TagField
 690      *     TagField data
 691      * TagField:
 692      *     Tag Length
 693      *     TaggedData
 694      * Tag:
 695      *     pattern_char_index




 655         numberFormat = cachedNumberFormatData.get(loc);
 656         if (numberFormat == null) { /* cache miss */
 657             numberFormat = NumberFormat.getIntegerInstance(loc);
 658             numberFormat.setGroupingUsed(false);
 659 
 660             /* update cache */
 661             cachedNumberFormatData.putIfAbsent(loc, numberFormat);
 662         }
 663         numberFormat = (NumberFormat) numberFormat.clone();
 664 
 665         initializeDefaultCentury();
 666     }
 667 
 668     private void initializeCalendar(Locale loc) {
 669         if (calendar == null) {
 670             assert loc != null;
 671             // The format object must be constructed using the symbols for this zone.
 672             // However, the calendar should use the current default TimeZone.
 673             // If this is not contained in the locale zone strings, then the zone
 674             // will be formatted using generic GMT+/-H:MM nomenclature.
 675             calendar = Calendar.getInstance(loc);
 676         }
 677     }
 678 
 679     /**
 680      * Returns the compiled form of the given pattern. The syntax of
 681      * the compiled pattern is:
 682      * <blockquote>
 683      * CompiledPattern:
 684      *     EntryList
 685      * EntryList:
 686      *     Entry
 687      *     EntryList Entry
 688      * Entry:
 689      *     TagField
 690      *     TagField data
 691      * TagField:
 692      *     Tag Length
 693      *     TaggedData
 694      * Tag:
 695      *     pattern_char_index


< prev index next >