Hi, all.
I am working with xBaseJ lib and it's amazing. But, when I have done some interesting things, such as
//define fields
List<Field> list = new ArrayList<Field>();
list.add(new LogicalField("UnderGrad"));
....
//add their to file
for (Field field : columns) {
dbfFile.addField(field);
}
...
//Now cooking values :)
List<Object> values = new ArrayList<Object>();
values.add(true);
I tried to add List value to LogicalField, but an exception occurred. I have modified "put" method of LogicalField to this
public void put(String inValue) throws xBaseJException
{
String value = inValue.trim();
if (Util.dontTrimFields() == false)
value = inValue;
if (value.length() == 0) {
put(Boolean.FALSE);
return;
} else if (value.length() == 1) {
put(value.charAt(0));
return;
}
put(Boolean.valueOf(value));
}
And all works fine now. Does my modification has some disadvantages?
implemented in release 20140320