minchau 2004/12/16 11:21:44
Modified: java/src/org/apache/xml/serializer/utils Messages.java
Log:
Changes for moving the message keys, to be shared by all language
translations (including English). This is to prevent replication of these
keys during translation. Related to XALANJ-2021
Revision Changes Path
1.4 +3 -17
xml-xalan/java/src/org/apache/xml/serializer/utils/Messages.java
Index: Messages.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/serializer/utils/Messages.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Messages.java 16 Dec 2004 08:22:50 -0000 1.3
+++ Messages.java 16 Dec 2004 19:21:44 -0000 1.4
@@ -104,16 +104,6 @@
private String m_resourceBundleName;
- /**
- * String to use if a bad message key is used.
- * The ListResourceBundle should define a message with this key.
- */
- private static String BAD_MSGKEY = "BAD_CODE";
-
- /** String to use if the message format operation failed.
- * The ListResourceBundle should define a message with this key.
- */
- private static String BAD_MSGFORMAT = "FORMAT_FAILED";
/**
* Constructor.
@@ -132,10 +122,6 @@
m_resourceBundleName = resourceBundle;
}
- // This method is dropped because it makes the singleton messages object
- // mutable, and this messages object is used as long as the JVM stays up,
- // potentially by different users in a server situation.
- // This method was also never called anywhere in the serializer... so
it's gone.
/*
* Set the Locale object to use. If this method is not called the
* default locale is used. This method needs to be called before
@@ -234,7 +220,7 @@
msg =
java.text.MessageFormat.format(
- BAD_MSGKEY,
+ MsgKey.BAD_MSGKEY,
new Object[] { msgKey, m_resourceBundleName });
}
catch (Exception e)
@@ -275,7 +261,7 @@
// Get the message that the format failed.
fmsg =
java.text.MessageFormat.format(
- BAD_MSGFORMAT,
+ MsgKey.BAD_MSGFORMAT,
new Object[] { msgKey, m_resourceBundleName });
fmsg += " " + msg;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]