Skip to content

Commit

Permalink
refresh TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
iryndin committed Nov 26, 2014
1 parent f1108bb commit b54103b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/iryndin/jdbf/util/DbfMetadataUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static DbfMetadata fromFieldsString(String s) {
return metadata;
}

private static int calculateOneRecordLength(List<DbfField> fields) {
public static int calculateOneRecordLength(List<DbfField> fields) {
int result = 0;
for (DbfField field : fields) {
result += field.getLength();
Expand Down Expand Up @@ -101,10 +101,10 @@ public static void readFields(DbfMetadata metadata, ByteArrayInputStream inputSt
headerLength += 1;

if (headerLength != metadata.getFullHeaderLength()) {
// can throw Exception here
// TODO: handle this anyway!
}
if (fieldLength != metadata.getOneRecordLength()) {
// can throw Exception here
// TODO: handle this anyway!
}

metadata.setFields(fields);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/iryndin/jdbf/writer/DbfWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ private void writeBoolean(DbfField f, Boolean value) {

private void writeDate(DbfField f, Date value) {
byte[] bytes = JdbfUtils.writeDate(value);
// TODO:
// check that bytes.length = f.getLength();
// TODO: check that bytes.length = f.getLength();
System.arraycopy(bytes, 0, recordBuffer, f.getOffset(), bytes.length);
}

Expand Down

0 comments on commit b54103b

Please sign in to comment.