You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ma...@apache.org on 2003/02/07 06:42:46 UTC
cvs commit: jakarta-struts/src/share/org/apache/struts/action ActionServlet.java
martinc 2003/02/06 21:42:46
Modified: src/share/org/apache/struts/action ActionServlet.java
Log:
Add BigDecimal and BigInteger to the set of types for which default
converters are registered on startup.
PR: 16829
Submitted by: Brian Alexander Lee
Revision Changes Path
1.143 +12 -4 jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
Index: ActionServlet.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- ActionServlet.java 28 Jan 2003 19:30:23 -0000 1.142
+++ ActionServlet.java 7 Feb 2003 05:42:45 -0000 1.143
@@ -65,6 +65,8 @@
import java.io.IOException;
import java.io.InputStream;
+import java.math.BigDecimal;
+import java.math.BigInteger;
import java.net.URL;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -82,6 +84,8 @@
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.beanutils.ConvertUtils;
+import org.apache.commons.beanutils.converters.BigDecimalConverter;
+import org.apache.commons.beanutils.converters.BigIntegerConverter;
import org.apache.commons.beanutils.converters.BooleanConverter;
import org.apache.commons.beanutils.converters.ByteConverter;
import org.apache.commons.beanutils.converters.CharacterConverter;
@@ -1315,6 +1319,10 @@
}
if (convertNull) {
ConvertUtils.deregister();
+ ConvertUtils.register(new BigDecimalConverter(null),
+ BigDecimal.class);
+ ConvertUtils.register(new BigIntegerConverter(null),
+ BigInteger.class);
ConvertUtils.register(new BooleanConverter(null), Boolean.class);
ConvertUtils.register(new ByteConverter(null), Byte.class);
ConvertUtils.register(new CharacterConverter(null),
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org