[Gvsig_desarrolladores] Weird code on SelectableDataSource

Francisco Puga fpuga en cartolab.es
Jue Ene 10 15:57:27 CET 2013


(spanish below)

I found a weird code on the SelectableDataSource class, i paste it in
pastebin [1] and also it at the end of the mail.

I think that the fieldDecimalCount should be set from the original
value and not be hard coded, but not sure if there is some not
document behavior here that should be checked.

Opionions?


Me he encontrado un cacho de código un poco raro en
SelectableDataSource, lo he puesto en pastebin[1] y al final del
correo.

Creo que fieldDecimalCount debería ser seteado a partir del valor
original y no hard coded, pero no se si habrá algún comportamiento no
documentado que obligue a esto.

¿Alguna opinión?




if (NumberUtilities.isNumeric(type)) {
if (!NumberUtilities.isNumericInteger(type))
// TODO: If there is a lost in precision, this should be changed.
fieldsDescrip[i].setFieldDecimalCount(6);
}
else
fieldsDescrip[i].setFieldDecimalCount(0);

[1] http://pastebin.com/P4B2bWc2

--
Francisco Puga
Grupo de Desarrollo
Cartolab - Laboratorio de Ingeniería Cartográfica.
http://www.cartolab.es

ETS Ingeniería de Caminos, Canales y Puertos
Universidade da Coruña
Campus de Elviña - 15071 A Coruña (España)
(34)981167000 ext. 5493


Más información sobre la lista de distribución gvSIG_desarrolladores