changeset 32854:f29975c5b3c1

8138613: Remove SPI locale provider adapter from the default provider list Reviewed-by: okutsu
author naoto
date Mon, 05 Oct 2015 08:16:11 -0700
parents 15bb8b5dd10e
children 452710dfb667 650e7f1dc0fc
files jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java jdk/test/java/util/Locale/Bug8008577.java
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Mon Oct 05 17:38:04 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Mon Oct 05 08:16:11 2015 -0700
@@ -140,8 +140,10 @@
  * desired locale sensitive service is not available, then the runtime looks for CLDR,
  * JRE in that order.
  * <p>
- * The default order for looking up the preferred locale providers is "CLDR,JRE,SPI",
- * so specifying "CLDR,JRE,SPI" is identical to the default behavior.
+ * The default order for looking up the preferred locale providers is "CLDR,JRE",
+ * so specifying "CLDR,JRE" is identical to the default behavior. Applications which
+ * require implementations of the locale sensitive services must explicitly specify
+ * "SPI" in order for the Java runtime to load them from the classpath.
  *
  * @since        1.6
  */
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Mon Oct 05 17:38:04 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Mon Oct 05 08:16:11 2015 -0700
@@ -185,7 +185,6 @@
                 LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
             }
             typeList.add(Type.JRE);
-            typeList.add(Type.SPI);
             defaultLocaleProviderAdapter = Type.JRE;
         }
 
--- a/jdk/test/java/util/Locale/Bug8008577.java	Mon Oct 05 17:38:04 2015 +0300
+++ b/jdk/test/java/util/Locale/Bug8008577.java	Mon Oct 05 08:16:11 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8008577
+ * @bug 8008577 8138613
  * @summary Check whether CLDR locale provider adapter is enabled by default
  * @compile -XDignore.symbol.file Bug8008577.java
  * @run main Bug8008577
@@ -38,7 +38,6 @@
     static final LocaleProviderAdapter.Type[] expected = {
         LocaleProviderAdapter.Type.CLDR,
         LocaleProviderAdapter.Type.JRE,
-        LocaleProviderAdapter.Type.SPI,
     };
 
     public static void main(String[] args) {