dwinterfeldt 02/03/12 21:41:25
Modified: contrib/validator/src/share/org/apache/struts/validator/util
StrutsValidatorUtil.java
Log:
Changed boolean check if an arg is a resource. Commons Validator now stores this as
a boolean instead of a String.
Revision Changes Path
1.2 +12 -8
jakarta-struts/contrib/validator/src/share/org/apache/struts/validator/util/StrutsValidatorUtil.java
Index: StrutsValidatorUtil.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/contrib/validator/src/share/org/apache/struts/validator/util/StrutsValidatorUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StrutsValidatorUtil.java 15 Jan 2002 03:48:06 -0000 1.1
+++ StrutsValidatorUtil.java 13 Mar 2002 05:41:25 -0000 1.2
@@ -178,31 +178,35 @@
String sArg3 = null;
if (arg0 != null) {
- if ("true".equals(arg0.getResource()))
+ if (arg0.getResource()) {
sArg0 = getMessage(messages, locale, arg0.getKey());
- else
+ } else {
sArg0 = arg0.getKey();
+ }
}
if (arg1 != null) {
- if ("true".equals(arg1.getResource()))
+ if (arg1.getResource()) {
sArg1 = getMessage(messages, locale, arg1.getKey());
- else
+ } else {
sArg1 = arg1.getKey();
+ }
}
if (arg2 != null) {
- if ("true".equals(arg2.getResource()))
+ if (arg2.getResource()) {
sArg2 = getMessage(messages, locale, arg2.getKey());
- else
+ } else {
sArg2 = arg2.getKey();
+ }
}
if (arg3 != null) {
- if ("true".equals(arg3.getResource()))
+ if (arg3.getResource()) {
sArg3 = getMessage(messages, locale, arg3.getKey());
- else
+ } else {
sArg3 = arg3.getKey();
+ }
}
return new String[] { sArg0, sArg1, sArg2, sArg3 };
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>