SUGGESTED FIX
sccs diffs Installer.java SunConnection.java
------- Installer.java -------
627,632c627,630
< List<Locale> candidateLocales = getCandidateLocales(Locale.getDefault());
< for (Locale l : candidateLocales) {
< if (!locale.equals(locale) && supportedLocales.contains(l)) {
< name = REGISTRATION_HTML_NAME + "_" + l.toString();
< break;
< }
---
> Locale locale = getDefaultLocale();
> if (supportedLocales.contains(locale)) {
> // if the default locale is supported
> name = REGISTRATION_HTML_NAME + "_" + locale.toString();
647a646,655
> private static Locale getDefaultLocale() {
> List<Locale> candidateLocales = getCandidateLocales(Locale.getDefault());
> for (Locale l : candidateLocales) {
> if (supportedLocales.contains(l)) {
> return l;
> }
> }
> return Locale.getDefault();
> }
>
753,754d760
< String registerURL = SunConnection.getRegistrationURL(
< regData.getRegistrationURN()).toString();
783a790,792
> String registerURL = SunConnection.
> getRegistrationURL(regData.getRegistrationURN(),
> locale).toString();
888c897
< SunConnection.register(regData);
---
> SunConnection.register(regData, getDefaultLocale());
------- SunConnection.java -------
50c50
< * <registration-url>/<registry_urn>?product=jdk&locale=<default-locale>---
> * <registration-url>/<registry_urn>?product=jdk&locale=<locale>
62c62
< static URL getRegistrationURL(String registrationURN) {
---
> static URL getRegistrationURL(String registrationURN, Locale locale) {
80c80
< String registerURL = rewriteURL(url, registrationURN);
---
> String registerURL = rewriteURL(url, registrationURN, locale);
92c92
< private static String rewriteURL(String url, String registryURN) {
---
> private static String rewriteURL(String url, String registryURN, Locale locale) {
102c102
< sb.append("locale=").append(Locale.getDefault().toString());
---
> sb.append("locale=").append(locale.toString());
112a113
> * @param locale Locale
116c117
< public static void register(RegistrationData regData) throws IOException {---
> public static void register(RegistrationData regData, Locale locale) throws IOException {
118c119,120
< URL url = getRegistrationURL(regData.getRegistrationURN());
---
> URL url = getRegistrationURL(regData.getRegistrationURN(),
> locale);
|