Author: doogie
Date: Wed Oct 17 20:28:20 2007
New Revision: 585820
URL:
http://svn.apache.org/viewvc?rev=585820&view=revLog:
GenericEntity.setString is buggy in setString for Boolean and
BigDecimal. MemoryHelper.verifyValue is buggy for Boolean.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=585820&r1=585819&r2=585820&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Wed Oct 17 20:28:20 2007
@@ -391,7 +391,7 @@
// if this is a Boolean check to see if we should convert from an indicator or just leave as is
try {
int fieldType = SqlJdbcUtil.getType(type.getJavaType());
- if (fieldType != 9) {
+ if (fieldType != 10) {
value = ((Boolean) value).booleanValue() ? "Y" : "N";
}
} catch (GenericNotImplementedException e) {
@@ -490,12 +490,12 @@
set(name, isNullString ? null : Double.valueOf(value));
break;
- case 9:
- set(name, isNullString ? null : Boolean.valueOf(value));
+ case 9: // BigDecimal
+ set(name, isNullString ? null : new BigDecimal(value));
break;
- case 10: // BigDecimal
- set(name, isNullString ? null : new BigDecimal(value));
+ case 10:
+ set(name, isNullString ? null : Boolean.valueOf(value));
break;
case 11: // Object
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java?rev=585820&r1=585819&r2=585820&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java Wed Oct 17 20:28:20 2007
@@ -258,7 +258,7 @@
}
break;
- case 9:
+ case 10:
if (!(o instanceof Boolean)) {
return false;
}