Merge jdk8-b13
authorkatleman
Wed, 09 Nov 2011 13:46:53 -0800
changeset 47084cb2e8679b27
parent 4699 d636e737c478
parent 4707 5791714b9472
child 4709 52bd7fc8fcb0
Merge
     1.1 --- a/make/common/Demo.gmk	Thu Nov 03 10:32:29 2011 -0700
     1.2 +++ b/make/common/Demo.gmk	Wed Nov 09 13:46:53 2011 -0800
     1.3 @@ -158,6 +158,8 @@
     1.4      #       bit between them.
     1.5      LINK.demo   = $(LINK.c)
     1.6      LDLIBS.demo = $(EXTRA_LIBS) $(LFLAGS_$(COMPILER_VERSION))
     1.7 +    DEMO_VERSION_INFO = $(OBJDIR)/$(LIBRARY).res
     1.8 +    LDLIBS.demo += $(DEMO_VERSION_INFO)
     1.9    else
    1.10      ifneq ($(DEMO_NEEDS_CPP),)
    1.11        LINK.demo   = $(LINK.cpp)
    1.12 @@ -288,6 +290,13 @@
    1.13  	$(install-file)
    1.14  endif
    1.15  
    1.16 +ifeq ($(PLATFORM),windows)
    1.17 +# JDK name required here
    1.18 +RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
    1.19 +            /D "JDK_INTERNAL_NAME=$(LIBRARY)" \
    1.20 +            /D "JDK_FTYPE=0x2L"
    1.21 +endif
    1.22 +
    1.23  # Native library building
    1.24  ifdef DEMO_LIBRARY
    1.25  
    1.26 @@ -308,6 +317,9 @@
    1.27    # Actual creation of the native shared library (C++ and C are different)
    1.28  $(DEMO_LIBRARY): $(DEMO_FULL_OBJECTS)
    1.29  	@$(prep-target)
    1.30 +  ifeq ($(PLATFORM),windows)
    1.31 +	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(DEMO_VERSION_INFO) $(VERSIONINFO_RESOURCE)
    1.32 +  endif
    1.33  	$(LINK.demo) $(SHARED_LIBRARY_FLAG) $(CC_PROGRAM_OUTPUT_FLAG)$@ \
    1.34  	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
    1.35  	@$(call binary_file_verification,$@)
     2.1 --- a/src/share/classes/java/util/CurrencyData.properties	Thu Nov 03 10:32:29 2011 -0700
     2.2 +++ b/src/share/classes/java/util/CurrencyData.properties	Wed Nov 09 13:46:53 2011 -0800
     2.3 @@ -71,7 +71,7 @@
     2.4  #
     2.5  # The table is based on the following web sites:
     2.6  # http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/db_en.html
     2.7 -# http://www.bsi-global.com/iso4217currency
     2.8 +# http://www.currency-iso.org/iso_index/iso_tables.htm
     2.9  # http://www.cia.gov/cia/publications/factbook/indexgeo.html
    2.10  
    2.11  # AFGHANISTAN
    2.12 @@ -105,7 +105,7 @@
    2.13  # AUSTRIA
    2.14  AT=EUR
    2.15  # AZERBAIJAN
    2.16 -AZ=AZM;2005-12-31-20-00-00;AZN
    2.17 +AZ=AZN
    2.18  # BAHAMAS
    2.19  BS=BSD
    2.20  # BAHRAIN
    2.21 @@ -378,7 +378,7 @@
    2.22  # MOROCCO
    2.23  MA=MAD
    2.24  # MOZAMBIQUE
    2.25 -MZ=MZM;2006-06-30-22-00-00;MZN
    2.26 +MZ=MZN
    2.27  # MYANMAR
    2.28  MM=MMK
    2.29  # NAMIBIA
    2.30 @@ -440,7 +440,7 @@
    2.31  # REUNION
    2.32  RE=EUR
    2.33  # ROMANIA
    2.34 -RO=ROL;2005-06-30-21-00-00;RON
    2.35 +RO=RON
    2.36  # RUSSIAN FEDERATION
    2.37  RU=RUB
    2.38  # RWANDA
    2.39 @@ -532,7 +532,7 @@
    2.40  # TUNISIA
    2.41  TN=TND
    2.42  # TURKEY
    2.43 -TR=TRL;2004-12-31-22-00-00;TRY
    2.44 +TR=TRY
    2.45  # TURKMENISTAN
    2.46  TM=TMT
    2.47  # TURKS AND CAICOS ISLANDS
    2.48 @@ -558,7 +558,7 @@
    2.49  # VANUATU
    2.50  VU=VUV
    2.51  # VENEZUELA
    2.52 -VE=VEB;2008-01-01-04-00-00;VEF
    2.53 +VE=VEF
    2.54  # VIET NAM
    2.55  VN=VND
    2.56  # VIRGIN ISLANDS, BRITISH
     3.1 --- a/src/share/classes/sun/text/resources/CollationData_th.java	Thu Nov 03 10:32:29 2011 -0700
     3.2 +++ b/src/share/classes/sun/text/resources/CollationData_th.java	Wed Nov 09 13:46:53 2011 -0800
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -103,18 +103,13 @@
    3.11                  //
    3.12                  // Normal vowels
    3.13                  //
    3.14 +                + "< \u0E4D "                   //  NIKHAHIT
    3.15                  + "< \u0E30 "                   //  SARA A
    3.16                  + "< \u0E31 "                   //  MAI HAN-AKAT
    3.17                  + "< \u0E32 "                   //  SARA AA
    3.18  
    3.19 -                // Normalizer will decompose this character to \u0e4d\u0e32.  This is
    3.20 -                // a Bad Thing, because we want the separate characters to sort
    3.21 -                // differently than this individual one.  Since there's no public way to
    3.22 -                // set the decomposition to be used when creating a collator, there's
    3.23 -                // no way around this right now.
    3.24 -                // It's best to go ahead and leave the character in, because it occurs
    3.25 -                // this way a lot more often than it occurs as separate characters.
    3.26 -                + "< \u0E33 "                   //  SARA AM
    3.27 +                // Normalizer will decompose this character to \u0e4d\u0e32.
    3.28 +                + "< \u0E33 = \u0E4D\u0E32 "                   //  SARA AM
    3.29  
    3.30                  + "< \u0E34 "                   //  SARA I
    3.31  
    3.32 @@ -133,62 +128,58 @@
    3.33                  + "< \u0E43 "                   //  SARA AI MAIMUAN
    3.34                  + "< \u0E44 "                   //  SARA AI MAIMALAI
    3.35  
    3.36 -                //
    3.37 -                // Digits
    3.38 -                //
    3.39 -                + "< \u0E50 "                   //  DIGIT ZERO
    3.40 -                + "< \u0E51 "                   //  DIGIT ONE
    3.41 -                + "< \u0E52 "                   //  DIGIT TWO
    3.42 -                + "< \u0E53 "                   //  DIGIT THREE
    3.43 -                + "< \u0E54 "                   //  DIGIT FOUR
    3.44 -                + "< \u0E55 "                   //  DIGIT FIVE
    3.45 -                + "< \u0E56 "                   //  DIGIT SIX
    3.46 -                + "< \u0E57 "                   //  DIGIT SEVEN
    3.47 -                + "< \u0E58 "                   //  DIGIT EIGHT
    3.48 -                + "< \u0E59 "                   //  DIGIT NINE
    3.49  
    3.50 -                // Sorta tonal marks, but maybe not really
    3.51 -                + "< \u0E4D "                   //  NIKHAHIT
    3.52 +                //according to CLDR, it's after 0e44
    3.53 +                + "< \u0E3A "                   //  PHINTHU
    3.54  
    3.55 -                //
    3.56 -                // Thai symbols are supposed to sort "after white space".
    3.57 -                // I'm treating this as making them sort just after the normal Latin-1
    3.58 -                // symbols, which are in turn after the white space.
    3.59 -                //
    3.60 -                + "&'\u007d'"  //  right-brace
    3.61 -                + "< \u0E2F "                   //  PAIYANNOI      (ellipsis, abbreviation)
    3.62 -                + "< \u0E46 "                   //  MAIYAMOK
    3.63 -                + "< \u0E4F "                   //  FONGMAN
    3.64 -                + "< \u0E5A "                   //  ANGKHANKHU
    3.65 -                + "< \u0E5B "                   //  KHOMUT
    3.66 -                + "< \u0E3F "                   //  CURRENCY SYMBOL BAHT
    3.67  
    3.68 -                // These symbols are supposed to be "after all characters"
    3.69 -                + "< \u0E4E "                   //  YAMAKKAN
    3.70  
    3.71 -                // This rare symbol also comes after all characters.  But when it is
    3.72 -                // used in combination with RU and LU, the combination is treated as
    3.73 -                // a separate letter, ala "CH" sorting after "C" in traditional Spanish.
    3.74 +                // This rare symbol comes after all characters.
    3.75                  + "< \u0E45 "                   //  LAKKHANGYAO
    3.76 -                + "& \u0E24 < \u0E24\u0E45 "
    3.77 -                + "& \u0E26 < \u0E26\u0E45 "
    3.78 +                + "& \u0E32 , \0E45 "           // According to CLDR, 0E45 is after 0E32 in tertiary level
    3.79  
    3.80 -                // Tonal marks are primary ignorables but are treated as secondary
    3.81 -                // differences
    3.82 +
    3.83 +
    3.84 +
    3.85 +                // Below are thai puntuation marks and Tonal(Accent) marks. According to CLDR 1.9 and
    3.86 +                // ISO/IEC 14651, Annex C, C.2.1 Thai ordering principles, 0E2F to 0E5B are punctuaion marks that need to be ignored
    3.87 +                // in the first three leveles.  0E4E to 0E4B are tonal marks to be compared in secondary level.
    3.88 +                // In real implmentation, set puncutation marks in tertiary as there is no fourth level in Java.
    3.89 +                // Set all these special marks after \u0301, the accute accent.
    3.90                  + "& \u0301 "   // acute accent
    3.91 +
    3.92 +                //puncutation marks
    3.93 +                + ", \u0E2F "                   //  PAIYANNOI      (ellipsis, abbreviation)
    3.94 +                + ", \u0E46 "                   //  MAIYAMOK
    3.95 +                + ", \u0E4F "                   //  FONGMAN
    3.96 +                + ", \u0E5A "                   //  ANGKHANKHU
    3.97 +                + ", \u0E5B "                   //  KHOMUT
    3.98 +
    3.99 +                //tonal marks
   3.100 +                + "; \u0E4E "                   //  YAMAKKAN
   3.101 +                + "; \u0E4C "                   //  THANTHAKHAT
   3.102                  + "; \u0E47 "                   //  MAITAIKHU
   3.103                  + "; \u0E48 "                   //  MAI EK
   3.104                  + "; \u0E49 "                   //  MAI THO
   3.105                  + "; \u0E4A "                   //  MAI TRI
   3.106                  + "; \u0E4B "                   //  MAI CHATTAWA
   3.107 -                + "; \u0E4C "                   //  THANTHAKHAT
   3.108  
   3.109 +                //
   3.110 +                // Digits are equal to their corresponding Arabic digits in the first level
   3.111 +                //
   3.112 +                + "& 0 = \u0E50 "                   //  DIGIT ZERO
   3.113 +                + "& 1 = \u0E51 "                   //  DIGIT ONE
   3.114 +                + "& 2 = \u0E52 "                   //  DIGIT TWO
   3.115 +                + "& 3 = \u0E53 "                   //  DIGIT THREE
   3.116 +                + "& 4 = \u0E54 "                   //  DIGIT FOUR
   3.117 +                + "& 5 = \u0E55 "                   //  DIGIT FIVE
   3.118 +                + "& 6 = \u0E56 "                   //  DIGIT SIX
   3.119 +                + "& 7 = \u0E57 "                   //  DIGIT SEVEN
   3.120 +                + "& 8 = \u0E58 "                   //  DIGIT EIGHT
   3.121 +                + "& 9 = \u0E59 "                   //  DIGIT NINE
   3.122  
   3.123 -                // These are supposed to be ignored, so I'm treating them as controls
   3.124 -                + "& \u0001 "
   3.125 -                + "= \u0E3A "                   //  PHINTHU
   3.126 -                + "= '.' "                      //  period
   3.127 -                }
   3.128 +
   3.129 +            }
   3.130          };
   3.131      }
   3.132  }
     4.1 --- a/src/share/classes/sun/util/resources/CalendarData_lv.properties	Thu Nov 03 10:32:29 2011 -0700
     4.2 +++ b/src/share/classes/sun/util/resources/CalendarData_lv.properties	Wed Nov 09 13:46:53 2011 -0800
     4.3 @@ -1,5 +1,5 @@
     4.4  #
     4.5 -# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
     4.6 +# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     4.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8  #
     4.9  # This code is free software; you can redistribute it and/or modify it
    4.10 @@ -23,21 +23,45 @@
    4.11  # questions.
    4.12  #
    4.13  
    4.14 -# (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
    4.15 -# (C) Copyright IBM Corp. 1996 - 1999 - All Rights Reserved
    4.16  #
    4.17 -# The original version of this source code and documentation
    4.18 -# is copyrighted and owned by Taligent, Inc., a wholly-owned
    4.19 -# subsidiary of IBM. These materials are provided under terms
    4.20 -# of a License Agreement between Taligent and Sun. This technology
    4.21 -# is protected by multiple US and International patents.
    4.22 +# COPYRIGHT AND PERMISSION NOTICE
    4.23  #
    4.24 -# This notice and attribution to Taligent may not be removed.
    4.25 -# Taligent is a registered trademark of Taligent, Inc.
    4.26 +# Copyright (C) 1991-2011 Unicode, Inc. All rights reserved.
    4.27 +# Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
    4.28 +#
    4.29 +# Permission is hereby granted, free of charge, to any person obtaining
    4.30 +# a copy of the Unicode data files and any associated documentation (the
    4.31 +# "Data Files") or Unicode software and any associated documentation
    4.32 +# (the "Software") to deal in the Data Files or Software without
    4.33 +# restriction, including without limitation the rights to use, copy,
    4.34 +# modify, merge, publish, distribute, and/or sell copies of the Data
    4.35 +# Files or Software, and to permit persons to whom the Data Files or
    4.36 +# Software are furnished to do so, provided that (a) the above copyright
    4.37 +# notice(s) and this permission notice appear with all copies of the
    4.38 +# Data Files or Software, (b) both the above copyright notice(s) and
    4.39 +# this permission notice appear in associated documentation, and (c)
    4.40 +# there is clear notice in each modified Data File or in the Software as
    4.41 +# well as in the documentation associated with the Data File(s) or
    4.42 +# Software that the data or software has been modified.
    4.43 +#
    4.44 +# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
    4.45 +# ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    4.46 +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    4.47 +# NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT
    4.48 +# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR
    4.49 +# ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
    4.50 +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    4.51 +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
    4.52 +# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
    4.53 +# SOFTWARE.
    4.54 +#
    4.55 +# Except as contained in this notice, the name of a copyright holder
    4.56 +# shall not be used in advertising or otherwise to promote the sale, use
    4.57 +# or other dealings in these Data Files or Software without prior
    4.58 +# written authorization of the copyright holder.
    4.59  
    4.60 -
    4.61 -# This bundle is empty because the data of the base bundle
    4.62 -# is adequate for this locale.
    4.63 -# The bundle is necessary to prevent the resource
    4.64 -# bundle lookup from falling back to the default
    4.65 -# locale.
    4.66 +#
    4.67 +# Generated automatically from the Common Locale Data Repository. DO NOT EDIT!
    4.68 +#
    4.69 +firstDayOfWeek=2
    4.70 +minimalDaysInFirstWeek=4
     5.1 --- a/test/java/util/Currency/CurrencyTest.java	Thu Nov 03 10:32:29 2011 -0700
     5.2 +++ b/test/java/util/Currency/CurrencyTest.java	Wed Nov 09 13:46:53 2011 -0800
     5.3 @@ -128,18 +128,20 @@
     5.4              checkCountryCurrency(country1[i], currency1[i]);
     5.5          }
     5.6  
     5.7 -        // check currency changes
     5.8 -        String[] switchOverCtry = {"DE", "FR", "ES", "IT", "NL", "BE", "TR", "RO", "AZ", "MZ", "GH", "VE"};
     5.9 -        String[] switchOverOld = {"DEM", "FRF", "ESP", "ITL", "NLG", "BEF", "TRL", "ROL", "AZM", "MZM", "GHC", "VEB"};
    5.10 -        String[] switchOverNew = {"EUR", "EUR", "EUR", "EUR", "EUR", "EUR", "TRY", "RON", "AZN", "MZN", "GHS", "VEF"};
    5.11 -        String[] switchOverTZ = {"Europe/Paris", "Europe/Paris", "Europe/Paris", "Europe/Paris",
    5.12 -                                 "Europe/Paris", "Europe/Paris", "Asia/Istanbul", "Europe/Bucharest",
    5.13 -                                 "Asia/Baku", "Africa/Maputo", "Africa/Accra", "America/Caracas"};
    5.14 -        int[] switchOverYear = {2002, 2002, 2002, 2002, 2002, 2002, 2005, 2005, 2006, 2006, 2007, 2008};
    5.15 -        int[] switchOverMonth = {Calendar.JANUARY, Calendar.JANUARY, Calendar.JANUARY, Calendar.JANUARY,
    5.16 -                                 Calendar.JANUARY, Calendar.JANUARY, Calendar.JANUARY, Calendar.JULY,
    5.17 -                                 Calendar.JANUARY, Calendar.JULY, Calendar.JULY, Calendar.JANUARY};
    5.18 -        int[] switchOverDay = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
    5.19 +        /*
    5.20 +        * check currency changes
    5.21 +        * In current implementation, there is no data of old currency and transition date at jdk/src/share/classes/java/util/CurrencyData.properties.
    5.22 +        * So, all the switch data arrays are empty. In the future, if data of old currency and transition date are necessary for any country, the
    5.23 +        * arrays here can be updated so that the program can check the currency switch.
    5.24 +        */
    5.25 +        String[] switchOverCtry = {};
    5.26 +        String[] switchOverOld = {};
    5.27 +        String[] switchOverNew = {};
    5.28 +        String[] switchOverTZ = {};
    5.29 +        int[] switchOverYear = {};
    5.30 +        int[] switchOverMonth = {};
    5.31 +        int[] switchOverDay = {};
    5.32 +
    5.33          for (int i = 0; i < switchOverCtry.length; i++) {
    5.34              TimeZone.setDefault(TimeZone.getTimeZone(switchOverTZ[i]));
    5.35              Calendar date = new GregorianCalendar(switchOverYear[i], switchOverMonth[i], switchOverDay[i]);
     6.1 --- a/test/java/util/Currency/ValidateISO4217.java	Thu Nov 03 10:32:29 2011 -0700
     6.2 +++ b/test/java/util/Currency/ValidateISO4217.java	Wed Nov 09 13:46:53 2011 -0800
     6.3 @@ -92,7 +92,7 @@
     6.4  
     6.5      /* Codes that are obsolete, do not have related country */
     6.6      static final String otherCodes =
     6.7 -        "ADP-AFA-ATS-AYM-BEF-BGL-BOV-BYB-CLF-CUC-CYP-DEM-EEK-ESP-FIM-FRF-GRD-GWP-IEP-ITL-LUF-MGF-MTL-MXV-NLG-PTE-RUR-SDD-SIT-SKK-SRG-TMM-TPE-TRL-VEF-USN-USS-XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-YUM-ZWD-ZWN-ZWR";
     6.8 +        "ADP-AFA-ATS-AYM-AZM-BEF-BGL-BOV-BYB-CLF-CUC-CYP-DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-IEP-ITL-LUF-MGF-MTL-MXV-MZM-NLG-PTE-ROL-RUR-SDD-SIT-SKK-SRG-TMM-TPE-TRL-VEF-USN-USS-VEB-XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-YUM-ZWD-ZWN-ZWR";
     6.9  
    6.10      static boolean err = false;
    6.11  
     7.1 --- a/test/java/util/Currency/tablea1.txt	Thu Nov 03 10:32:29 2011 -0700
     7.2 +++ b/test/java/util/Currency/tablea1.txt	Wed Nov 09 13:46:53 2011 -0800
     7.3 @@ -23,7 +23,7 @@
     7.4  AU	AUD	36	2
     7.5  AT	EUR	978	2
     7.6  # MA 129
     7.7 -AZ	AZM	31	2	2005-12-31-20-00-00	AZN	944	2
     7.8 +AZ	AZN	944	2
     7.9  BS	BSD	44	2
    7.10  BH	BHD	48	3
    7.11  BD	BDT	50	2
    7.12 @@ -96,7 +96,7 @@
    7.13  GM	GMD	270	2
    7.14  GE	GEL	981	2
    7.15  DE	EUR	978	2
    7.16 -GH	GHC	288	2	2007-07-01-00-00-00	GHS	936	2
    7.17 +GH	GHS	936	2
    7.18  GI	GIP	292	2
    7.19  GR	EUR	978	2
    7.20  GL	DKK	208	2
    7.21 @@ -166,7 +166,7 @@
    7.22  MS	XCD	951	2
    7.23  MA	MAD	504	2
    7.24  # MA 130
    7.25 -MZ	MZM	508	2	2006-06-30-22-00-00	MZN	943	2
    7.26 +MZ	MZN	943	2
    7.27  MM	MMK	104	2
    7.28  # MA 134
    7.29  ME	EUR	978	2
    7.30 @@ -200,7 +200,7 @@
    7.31  PR	USD	840	2
    7.32  QA	QAR	634	2
    7.33  RE	EUR	978	2
    7.34 -RO	ROL	946	2	2005-06-30-21-00-00	RON	946	2
    7.35 +RO	RON	946	2
    7.36  RU	RUB	643	2
    7.37  RW	RWF	646	0
    7.38  SH	SHP	654	2
    7.39 @@ -266,7 +266,7 @@
    7.40  UY	UYU	858	2
    7.41  UZ	UZS	860	2
    7.42  VU	VUV	548	0
    7.43 -VE	VEB	862	2	2008-01-01-04-00-00	VEF	937	2
    7.44 +VE	VEF	937	2
    7.45  VN	VND	704	2
    7.46  VG	USD	840	2
    7.47  VI	USD	840	2
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/test/sun/text/resources/Collator/Bug6755060.java	Wed Nov 09 13:46:53 2011 -0800
     8.3 @@ -0,0 +1,100 @@
     8.4 +/*
     8.5 + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
     8.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.7 + *
     8.8 + * This code is free software; you can redistribute it and/or modify it
     8.9 + * under the terms of the GNU General Public License version 2 only, as
    8.10 + * published by the Free Software Foundation.
    8.11 + *
    8.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    8.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    8.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    8.15 + * version 2 for more details (a copy is included in the LICENSE file that
    8.16 + * accompanied this code).
    8.17 + *
    8.18 + * You should have received a copy of the GNU General Public License version
    8.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    8.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    8.21 + *
    8.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    8.23 + * or visit www.oracle.com if you need additional information or have any
    8.24 + * questions.
    8.25 + */
    8.26 +
    8.27 +/*
    8.28 + * @test
    8.29 + * @bug 6755060
    8.30 + * @summary updating collation tables for thai to make it consistent with CLDR 1.9
    8.31 + */
    8.32 +
    8.33 +import java.text.*;
    8.34 +import java.util.*;
    8.35 +
    8.36 +public class Bug6755060 {
    8.37 +
    8.38 +  /********************************************************
    8.39 +  *********************************************************/
    8.40 +  public static void main (String[] args) {
    8.41 +
    8.42 +    Locale reservedLocale = Locale.getDefault();
    8.43 +
    8.44 +    try{
    8.45 +
    8.46 +        int errors=0;
    8.47 +
    8.48 +        Locale loc = new Locale ("th", "TH");   // Thai
    8.49 +
    8.50 +        Locale.setDefault (loc);
    8.51 +        Collator col = Collator.getInstance ();
    8.52 +
    8.53 +        /*
    8.54 +        * The original data "data" are the data to be sorted provided by the submitter of the CR.
    8.55 +        * It's in correct order in accord with thai collation in CLDR 1.9. If we use old Java without this fix,
    8.56 +        * the output order will be incorrect. Correct order will be turned into incorrect order.
    8.57 +
    8.58 +        * If fix is there, "data" after sorting will be unchanged, same as "sortedData". If fix is lost (regression),
    8.59 +        * "data" after sorting will be changed, not as "sortedData".(not correct anymore)
    8.60 +
    8.61 +        * The submitter of the CR also gives a expected "sortedData" in the CR, but it's in accord with collation in CLDR 1.4.
    8.62 +        * His data to be sorted are actually well sorted in accord with CLDR 1.9.
    8.63 +        */
    8.64 +
    8.65 +        String[] data = {"\u0e01", "\u0e01\u0e2f", "\u0e01\u0e46", "\u0e01\u0e4f", "\u0e01\u0e5a", "\u0e01\u0e5b", "\u0e01\u0e4e", "\u0e01\u0e4c", "\u0e01\u0e48", "\u0e01\u0e01", "\u0e01\u0e4b\u0e01", "\u0e01\u0e4d", "\u0e01\u0e30", "\u0e01\u0e31\u0e01", "\u0e01\u0e32", "\u0e01\u0e33", "\u0e01\u0e34", "\u0e01\u0e35", "\u0e01\u0e36", "\u0e01\u0e37", "\u0e01\u0e38", "\u0e01\u0e39", "\u0e40\u0e01", "\u0e40\u0e01\u0e48", "\u0e40\u0e01\u0e49", "\u0e40\u0e01\u0e4b", "\u0e41\u0e01", "\u0e42\u0e01", "\u0e43\u0e01", "\u0e44\u0e01", "\u0e01\u0e3a", "\u0e24\u0e32", "\u0e24\u0e45", "\u0e40\u0e25", "\u0e44\u0e26"};
    8.66 +
    8.67 +        String[] sortedData = {"\u0e01", "\u0e01\u0e2f", "\u0e01\u0e46", "\u0e01\u0e4f", "\u0e01\u0e5a", "\u0e01\u0e5b", "\u0e01\u0e4e", "\u0e01\u0e4c", "\u0e01\u0e48", "\u0e01\u0e01", "\u0e01\u0e4b\u0e01", "\u0e01\u0e4d", "\u0e01\u0e30", "\u0e01\u0e31\u0e01", "\u0e01\u0e32", "\u0e01\u0e33", "\u0e01\u0e34", "\u0e01\u0e35", "\u0e01\u0e36", "\u0e01\u0e37", "\u0e01\u0e38", "\u0e01\u0e39", "\u0e40\u0e01", "\u0e40\u0e01\u0e48", "\u0e40\u0e01\u0e49", "\u0e40\u0e01\u0e4b", "\u0e41\u0e01", "\u0e42\u0e01", "\u0e43\u0e01", "\u0e44\u0e01", "\u0e01\u0e3a", "\u0e24\u0e32", "\u0e24\u0e45", "\u0e40\u0e25", "\u0e44\u0e26"};
    8.68 +
    8.69 +        Arrays.sort (data, col);
    8.70 +
    8.71 +        System.out.println ("Using " + loc.getDisplayName());
    8.72 +        for (int i = 0;  i < data.length;  i++) {
    8.73 +            System.out.println(data[i] + "  :  " + sortedData[i]);
    8.74 +            if (sortedData[i].compareTo(data[i]) != 0) {
    8.75 +                errors++;
    8.76 +            }
    8.77 +        }//end for
    8.78 +
    8.79 +        if (errors > 0){
    8.80 +            StringBuffer expected = new StringBuffer(), actual = new StringBuffer();
    8.81 +            expected.append(sortedData[0]);
    8.82 +            actual.append(data[0]);
    8.83 +
    8.84 +                for (int i=1; i<data.length; i++) {
    8.85 +                    expected.append(",");
    8.86 +                    expected.append(sortedData[i]);
    8.87 +
    8.88 +                    actual.append(",");
    8.89 +                    actual.append(data[i]);
    8.90 +                }
    8.91 +
    8.92 +            String errmsg = "Error is found in collation testing in Thai\n" + "exepected order is: " + expected.toString() + "\n" + "actual order is: " + actual.toString() + "\n";
    8.93 +
    8.94 +            throw new RuntimeException(errmsg);
    8.95 +        }
    8.96 +    }finally{
    8.97 +        // restore the reserved locale
    8.98 +        Locale.setDefault(reservedLocale);
    8.99 +    }
   8.100 +
   8.101 +  }//end main
   8.102 +
   8.103 +}//end class CollatorTest
     9.1 --- a/test/sun/text/resources/LocaleData	Thu Nov 03 10:32:29 2011 -0700
     9.2 +++ b/test/sun/text/resources/LocaleData	Wed Nov 09 13:46:53 2011 -0800
     9.3 @@ -7006,3 +7006,7 @@
     9.4  CurrencyNames/zh_TW/cuc=\u53e4\u5df4\u53ef\u8f49\u63db\u62ab\u7d22
     9.5  CurrencyNames/zh_TW/tmt=\u571f\u5eab\u66fc\u65b0\u99ac\u7d0d\u7279
     9.6  CurrencyNames/zh_TW/zwl=\u8f9b\u5df4\u5a01\u5143 (2009)
     9.7 +
     9.8 +# bug 7101495
     9.9 +CalendarData/lv/firstDayOfWeek=2
    9.10 +CalendarData/lv/minimalDaysInFirstWeek=4
    10.1 --- a/test/sun/text/resources/LocaleDataTest.java	Thu Nov 03 10:32:29 2011 -0700
    10.2 +++ b/test/sun/text/resources/LocaleDataTest.java	Wed Nov 09 13:46:53 2011 -0800
    10.3 @@ -33,7 +33,7 @@
    10.4   *      6379214 6485516 6486607 4225362 4494727 6533691 6531591 6531593 6570259
    10.5   *      6509039 6609737 6610748 6645271 6507067 6873931 6450945 6645268 6646611
    10.6   *      6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
    10.7 - *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203
    10.8 + *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
    10.9   * @summary Verify locale data
   10.10   *
   10.11   */