equal
deleted
inserted
replaced
17 * See the License for the specific language governing permissions and |
17 * See the License for the specific language governing permissions and |
18 * limitations under the License. |
18 * limitations under the License. |
19 */ |
19 */ |
20 package com.sun.org.apache.xerces.internal.util; |
20 package com.sun.org.apache.xerces.internal.util; |
21 |
21 |
|
22 import com.sun.org.apache.xerces.internal.utils.SecuritySupport; |
22 import java.util.Locale; |
23 import java.util.Locale; |
23 import java.util.MissingResourceException; |
24 import java.util.MissingResourceException; |
24 import java.util.ResourceBundle; |
25 import java.util.ResourceBundle; |
25 import java.util.PropertyResourceBundle; |
|
26 |
26 |
27 /** |
27 /** |
28 * Used to format SAX error messages using a specified locale. |
28 * Used to format SAX error messages using a specified locale. |
29 * |
29 * |
30 * @author Michael Glavassevich, IBM |
30 * @author Michael Glavassevich, IBM |
31 * |
31 * |
|
32 * @version $Id: SAXMessageFormatter.java,v 1.6 2010-11-01 04:40:14 joehw Exp $ |
32 */ |
33 */ |
33 public class SAXMessageFormatter { |
34 public class SAXMessageFormatter { |
34 |
35 |
35 /** |
36 /** |
36 * Formats a message with the specified arguments using the given |
37 * Formats a message with the specified arguments using the given |
52 throws MissingResourceException { |
53 throws MissingResourceException { |
53 |
54 |
54 ResourceBundle resourceBundle = null; |
55 ResourceBundle resourceBundle = null; |
55 if (locale != null) { |
56 if (locale != null) { |
56 resourceBundle = |
57 resourceBundle = |
57 PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.SAXMessages", locale); |
58 SecuritySupport.getResourceBundle("com.sun.org.apache.xerces.internal.impl.msg.SAXMessages", locale); |
58 } |
59 } |
59 else { |
60 else { |
60 resourceBundle = |
61 resourceBundle = |
61 PropertyResourceBundle.getBundle("com.sun.org.apache.xerces.internal.impl.msg.SAXMessages"); |
62 SecuritySupport.getResourceBundle("com.sun.org.apache.xerces.internal.impl.msg.SAXMessages"); |
62 } |
63 } |
63 |
64 |
64 // format message |
65 // format message |
65 String msg; |
66 String msg; |
66 try { |
67 try { |