Author: desruisseaux
Date: Sun Nov 11 11:07:51 2012
New Revision: 1407938

URL: http://svn.apache.org/viewvc?rev=1407938&view=rev
Log:
Replaced Locale.UK and Locale.CANADA constants by Locale.US, because recent 
email on the JDK8 list
saids that all resources except US moved out of "rt.jar", in a separated JAR 
file. So if we want to
increase the chances that SIS run on platforms without the localization JAR 
file (maybe some mobile
devices?), we are better to stick to the Locale.US constant only for hard-coded 
country codes.

Modified:
    
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
    
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/DefaultInternationalString.java

Modified: 
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Angle.java?rev=1407938&r1=1407937&r2=1407938&view=diff
==============================================================================
--- 
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Angle.java 
(original)
+++ 
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/measure/Angle.java 
Sun Nov 11 11:07:51 2012
@@ -101,9 +101,9 @@ public class Angle implements Comparable
         } catch (ParseException exception) {
             /*
              * Use Exception.getMessage() instead than getLocalizedMessage() 
because the later
-             * is formatted in the AngleFormat locale, which is hard-coded to 
Locale.CANADA in
-             * our 'getAngleFormat()' implementation. The getMessage() method 
uses the system
-             * locale, which is what we actually want.
+             * is formatted in the AngleFormat locale, which is hard-coded to 
Locale.US in our
+             * 'getAngleFormat()' implementation. The getMessage() method uses 
the system locale,
+             * which is what we actually want.
              */
             NumberFormatException e = new 
NumberFormatException(exception.getMessage());
             e.initCause(exception);
@@ -239,8 +239,7 @@ public class Angle implements Comparable
     private static Format getAngleFormat() {
         assert Thread.holdsLock(Angle.class);
         if (format == null) {
-            format = AngleFormat.getInstance(Locale.CANADA);
-            // Canada locale is closer to ISO standards than US locale.
+            format = AngleFormat.getInstance(Locale.US);
         }
         return format;
     }

Modified: 
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/DefaultInternationalString.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/DefaultInternationalString.java?rev=1407938&r1=1407937&r2=1407938&view=diff
==============================================================================
--- 
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/DefaultInternationalString.java
 (original)
+++ 
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/type/DefaultInternationalString.java
 Sun Nov 11 11:07:51 2012
@@ -266,8 +266,7 @@ public class DefaultInternationalString 
      *       {@code null} locale, then that string is returned.</li>
      *   <li>Otherwise, acknowledging that UML identifiers in OGC/ISO 
specifications are primarily
      *       expressed in the English language, this method looks for an 
English string as an
-     *       approximation of a "unlocalized" string. The {@link Locale#UK} 
variant is
-     *       preferred because ISO specifications seem to use that 
language.</li>
+     *       approximation of a "unlocalized" string.</li>
      *   <li>If no English string was found, this method looks for a string 
for the
      *       {@linkplain Locale#getDefault() system default locale}.</li>
      *   <li>If none of the above steps found a string, then this method 
returns
@@ -295,7 +294,7 @@ public class DefaultInternationalString 
              */
             text = localeMap.get(null);
             if (text == null) {
-                Locale def = Locale.UK; // The default language for 
"unlocalized" string.
+                Locale def = Locale.US; // The default language for 
"unlocalized" string.
                 if (locale != def) { // Avoid requesting the same locale twice 
(optimization).
                     text = getString(def);
                     if (text != null) {
@@ -303,7 +302,7 @@ public class DefaultInternationalString 
                     }
                 }
                 def = Locale.getDefault();
-                if (locale != def && def != Locale.UK) {
+                if (locale != def && def != Locale.US) {
                     text = getString(def);
                     if (text != null) {
                         return text;


Reply via email to