Revision 45047
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 | ||
---|---|---|
810 | 810 |
} |
811 | 811 |
} |
812 | 812 |
DataType dataType = featureAttributeDescriptor.getDataType(); |
813 |
Class<? extends DataType> theClass = dataType.getClass(); |
|
813 |
Class<? extends DataType> theClass = dataType.getDefaultClass();
|
|
814 | 814 |
if( theClass!=null && !theClass.isInstance(value) ) { |
815 | 815 |
try { |
816 | 816 |
value = this.getDataTypesManager().coerce(dataType.getType(), value); |
817 | 817 |
} catch (CoercionException e) { |
818 | 818 |
throw new IllegalArgumentException( |
819 |
"Can't convert to "+theClass.getName()+ |
|
820 |
" from '"+value.getClass().getName()+ |
|
819 |
"Can't convert to "+theClass.getSimpleName()+
|
|
820 |
" from '"+value.getClass().getSimpleName()+
|
|
821 | 821 |
"' with value '"+value.toString()+"'."); |
822 | 822 |
} |
823 | 823 |
} |
Also available in: Unified diff