Adrian,

I did not thought that way, and thought only about primitives wrappers.
Done at r889319, much cleaner and OO, thanks

Jacques
()  ascii ribbon campaign against HTML e-mail
/\  www.asciiribbon.org


From: "Adrian Crum" <[email protected]>
Jacques,

Most numeric classes extend Number, so you could test for Number and eliminate 
a lot of those conditionals.

-Adrian

[email protected] wrote:
Author: jleroux
Date: Wed Dec  9 23:15:19 2009
New Revision: 889015

URL: http://svn.apache.org/viewvc?rev=889015&view=rev
Log:
I found Long to appear too much. While at it I add all primtives wrappers

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java?rev=889015&r1=889014&r2=889015&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java 
(original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java Wed Dec  
9 23:15:19 2009
@@ -766,7 +766,13 @@
if (value instanceof Boolean) return false; if (value instanceof Integer) return false; if (value instanceof Long) return false; - if (value instanceof java.math.BigDecimal) return false; + if (value instanceof Float) return false; + if (value instanceof Double) return false; + if (value instanceof Short) return false; + if (value instanceof Byte) return false; + if (value instanceof Character) return false; + if (value instanceof java.math.BigDecimal) return false; + if (value instanceof java.math.BigInteger) return false; if (value instanceof java.sql.Timestamp) return false; Debug.logWarning("In ObjectType.isEmpty(Object value) returning false for " + value.getClass() + " Object.", module);






Reply via email to