Skip to content

Commit

Permalink
Merge pull request #84 from mytang0/master
Browse files Browse the repository at this point in the history
Fix method name spelling error
  • Loading branch information
vongosling committed Nov 29, 2021
2 parents eb1ad9e + 23a66a4 commit 317edf3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void setBodyCrc(int bodyCrc) {
this.bodyCrc = bodyCrc;
}

public int computSizeInBytes() {
public int computeSizeInBytes() {
size = HEADER_SIZE + 4 + body.length;
return size;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DLedgerEntryCoder {

public static void encode(DLedgerEntry entry, ByteBuffer byteBuffer) {
byteBuffer.clear();
int size = entry.computSizeInBytes();
int size = entry.computeSizeInBytes();
//always put magic on the first position
byteBuffer.putInt(entry.getMagic());
byteBuffer.putInt(size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void testEncodeDecode() {
entry.setIndex(444);
entry.setMagic(666);
entry.setChannel(12);
entry.computSizeInBytes();
entry.computeSizeInBytes();

ByteBuffer buffer = ByteBuffer.allocate(entry.getSize());
DLedgerEntryCoder.encode(entry, buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public void testAppendAsFollower() {
entry.setPos(currPos);
DLedgerEntry resEntry = fileStore.appendAsFollower(entry, 0, "n1");
Assert.assertEquals(i, resEntry.getIndex());
currPos = currPos + entry.computSizeInBytes();
currPos = currPos + entry.computeSizeInBytes();
}
for (long i = 0; i < 10; i++) {
DLedgerEntry entry = fileStore.get(i);
Expand Down

0 comments on commit 317edf3

Please sign in to comment.