Closed HelmutL closed 6 months ago
If a MEMO field is null, reading it by getString() does not deliver a null but a shrt String containing binary zeros.
Bug: DBFReader.readMemoField() should test nBlock against 0 instead of null
Number nBlock = null; if (field.getLength() == 10) { nBlock = DBFUtils.readNumericStoredAsText(this.dataInputStream, field.getLength()); } else { nBlock = DBFUtils.readLittleEndianInt(this.dataInputStream); } if (this.memoFile != null && /* nBlock != null*/ nBlock.intValue() != 0) { DBFDataType type = field.getType(); if (type == DBFDataType.MEMO && fieldsAsBinary.contains(field.getName().toUpperCase())) { type = DBFDataType.BINARY; } return memoFile.readData(nBlock.intValue(), type); } return null;
Thanks for the issue.
Fixed, checking for null (just in case) and nBlock being a positive value.
If a MEMO field is null, reading it by getString() does not deliver a null but a shrt String containing binary zeros.
Bug: DBFReader.readMemoField() should test nBlock against 0 instead of null