dgraham 2003/05/28 20:03:02
Modified: validator/src/share/org/apache/commons/validator
ValidatorResources.java
Log:
Changed getForm(Locale, Object) to getForm(Locale, String).
Revision Changes Path
1.21 +16 -15
jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java
Index: ValidatorResources.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResources.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ValidatorResources.java 28 May 2003 04:14:32 -0000 1.20
+++ ValidatorResources.java 29 May 2003 03:03:02 -0000 1.21
@@ -330,13 +330,13 @@
* @deprecated Use getForm() instead.
*/
public Form get(Locale locale, Object formKey) {
- return this.getForm(locale, formKey);
+ return this.getForm(locale, formKey.toString());
}
/**
- * <p>Gets a <code>Form</code> based on the name of the form and the
<code>Locale</code> that
- * most closely matches the <code>Locale</code> passed in. The order of
<code>Locale</code>
- * matching is:</p>
+ * <p>Gets a <code>Form</code> based on the name of the form and the
+ * <code>Locale</code> that most closely matches the <code>Locale</code>
+ * passed in. The order of <code>Locale</code> matching is:</p>
* <ol>
* <li>language + country + variant</li>
* <li>language + country</li>
@@ -344,7 +344,7 @@
* <li>default locale</li>
* </ol>
*/
- public Form getForm(Locale locale, Object formKey) {
+ public Form getForm(Locale locale, String formKey) {
return this.getForm(
locale.getLanguage(),
locale.getCountry(),
@@ -370,7 +370,7 @@
String variant,
Object formKey) {
- return this.getForm(language, country, variant, formKey);
+ return this.getForm(language, country, variant, formKey.toString());
}
/**
@@ -388,7 +388,7 @@
String language,
String country,
String variant,
- Object formKey) {
+ String formKey) {
String key = this.buildLocale(language, country, variant);
@@ -427,10 +427,11 @@
}
/**
- * <p>Process the <code>ValidatorResources</code> object. </p>
- *
- * <p>Currently sets the <code>FastHashMap</code>s to the 'fast'
- * mode and call the processes all other resources.</p>
+ * Process the <code>ValidatorResources</code> object. Currently sets the
+ * <code>FastHashMap</code>s to the 'fast' mode and call the processes all
+ * other resources. <strong>Note</strong>: The framework calls this
automatically
+ * when ValidatorResources is created from an XML file. If you create an
instance
+ * of this class by hand you <strong>must</strong> call this method when
finished.
*/
public void process() {
hFormSets.setFast(true);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]