jaxp/src/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java
changeset 16953 a44e04deb948
parent 12457 c348e06f0e82
child 25264 040625ce9b72
equal deleted inserted replaced
16416:bcebd3fdefc9 16953:a44e04deb948
    18  * limitations under the License.
    18  * limitations under the License.
    19  */
    19  */
    20 
    20 
    21 package com.sun.org.apache.xerces.internal.util;
    21 package com.sun.org.apache.xerces.internal.util;
    22 
    22 
       
    23 import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
    23 import java.util.Locale;
    24 import java.util.Locale;
    24 import java.util.MissingResourceException;
    25 import java.util.MissingResourceException;
    25 import java.util.PropertyResourceBundle;
       
    26 import java.util.ResourceBundle;
    26 import java.util.ResourceBundle;
    27 
    27 
    28 /**
    28 /**
    29  * <p>Used to format JAXP 1.3 Datatype API error messages using a specified locale.</p>
    29  * <p>Used to format JAXP 1.3 Datatype API error messages using a specified locale.</p>
    30  *
    30  *
    31  * @author  Neeraj Bajaj, Sun Microsystems
    31  * @author  Neeraj Bajaj, Sun Microsystems
       
    32  * @version $Id: DatatypeMessageFormatter.java,v 1.6 2010-11-01 04:40:14 joehw Exp $
    32  */
    33  */
    33 public class DatatypeMessageFormatter {
    34 public class DatatypeMessageFormatter {
    34 
    35 
    35     private static final String BASE_NAME = "com.sun.org.apache.xerces.internal.impl.msg.DatatypeMessages";
    36     private static final String BASE_NAME = "com.sun.org.apache.xerces.internal.impl.msg.DatatypeMessages";
    36 
    37 
    54         throws MissingResourceException {
    55         throws MissingResourceException {
    55 
    56 
    56         ResourceBundle resourceBundle = null;
    57         ResourceBundle resourceBundle = null;
    57         if (locale != null) {
    58         if (locale != null) {
    58             resourceBundle =
    59             resourceBundle =
    59                 PropertyResourceBundle.getBundle(BASE_NAME, locale);
    60                 SecuritySupport.getResourceBundle(BASE_NAME, locale);
    60         }
    61         }
    61         else {
    62         else {
    62             resourceBundle =
    63             resourceBundle =
    63                 PropertyResourceBundle.getBundle(BASE_NAME);
    64                 SecuritySupport.getResourceBundle(BASE_NAME);
    64         }
    65         }
    65 
    66 
    66         // format message
    67         // format message
    67         String msg;
    68         String msg;
    68         try {
    69         try {