Revision 45131 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeature.java
DefaultFeature.java | ||
---|---|---|
217 | 217 |
} |
218 | 218 |
try { |
219 | 219 |
Coercion coercer = attribute.getDataType().getCoercion(); |
220 |
value= coercer.coerce(value, attribute.getCoercionContext()); |
|
220 |
if(attribute.getType()==DataTypes.STRING && value instanceof Boolean ){ |
|
221 |
value = coercer.coerce(value, attribute.getCoercionContext()); |
|
222 |
value = StringUtils.left((String) value, attribute.getSize()); |
|
223 |
} else { |
|
224 |
value= coercer.coerce(value, attribute.getCoercionContext()); |
|
225 |
} |
|
221 | 226 |
} catch (CoercionException e) { |
222 | 227 |
throw new IllegalArgumentException("Can't convert to " |
223 | 228 |
+ attribute.getDataType().getName() |
Also available in: Unified diff