self-review

This commit is contained in:
Matthew Simmons
2011-01-21 16:32:27 -05:00
parent a8d78664e9
commit adc4621711
2 changed files with 10 additions and 11 deletions
@@ -175,7 +175,6 @@ public class DatabaseImporter {
}
case ContentTypeIds.BLOB_TYPE_ID: {
int blobLength = reader.readInt();
System.err.println("read blob length " + blobLength);
if (blobLength != 0) {
byte[] blob = new byte[blobLength];
int readBytes = reader.read(blob, 0, blobLength);
@@ -204,16 +204,6 @@ public class DatabaseDumperTest extends TestCase {
}
}
private String readBlob(InputStream reader, int length) throws Exception {
if (length == 0) {
return "";
}
byte[] blob = new byte[length];
assertEquals(length, reader.read(blob));
return new String(blob);
}
public void testFewerRows() throws Exception {
// Dump only the first two rows
DatabaseDumper dumper = new DatabaseDumper(COLUMN_NAMES, COLUMN_TYPES, false);
@@ -267,4 +257,14 @@ public class DatabaseDumperTest extends TestCase {
assertEquals(COLUMN_TYPES[i], reader.readByte());
}
}
private String readBlob(InputStream reader, int length) throws Exception {
if (length == 0) {
return "";
}
byte[] blob = new byte[length];
assertEquals(length, reader.read(blob));
return new String(blob);
}
}