Skip to content

Commit

Permalink
PR feedback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
popematt committed May 9, 2024
1 parent 8097f3c commit 71dd0ce
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace=true

[{*.kt,*.kts}]
ij_kotlin_imports_layout = *
ij_kotlin_packages_to_use_import_on_demand=com.amazon.ion.**,java.util.*

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/amazon/ion/impl/IonCursorBinary.java
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ private boolean ensureCapacity(long minimumNumberOfBytesRequired) {
/**
* Attempts to fill the buffer so that it contains at least `numberOfBytes` after `index`.
* @param index the index after which to fill.
* @param numberOfBytes the number of bytes after `index` that need to be present.
* @param numberOfBytes the number of bytes starting at `index` that need to be present.
* @return false if not enough bytes were available in the stream to satisfy the request; otherwise, true.
*/
private boolean fillAt(long index, long numberOfBytes) {
Expand Down Expand Up @@ -1119,7 +1119,7 @@ private long slowReadFlexUInt_1_1() {
private long slowReadLengthOfFlexUInt_1_1(long position) {
int length = 1;
while (true) {
if (!fillAt(position, 0)) {
if (!fillAt(position, 1)) {
return -1;
}
int numZeros = Integer.numberOfTrailingZeros(buffer[(int) position]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.amazon.ion.impl.IonCursorTestUtilities.endStream;
import static com.amazon.ion.impl.IonCursorTestUtilities.fillIntValue;
import static com.amazon.ion.impl.IonCursorTestUtilities.scalar;
import static com.amazon.ion.impl.IonCursorTestUtilities.scalar;
import static com.amazon.ion.impl.IonCursorTestUtilities.fillSymbolValue;

public class IonReaderContinuableApplicationBinaryTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@
import java.io.ByteArrayInputStream;

import static com.amazon.ion.BitUtils.bytes;
import static com.amazon.ion.impl.IonCursorTestUtilities.*;
import static com.amazon.ion.impl.IonCursorTestUtilities.STANDARD_BUFFER_CONFIGURATION;
import static com.amazon.ion.impl.IonCursorTestUtilities.Expectation;
import static com.amazon.ion.impl.IonCursorTestUtilities.ExpectationProvider;
import static com.amazon.ion.impl.IonCursorTestUtilities.assertSequence;
import static com.amazon.ion.impl.IonCursorTestUtilities.container;
import static com.amazon.ion.impl.IonCursorTestUtilities.endContainer;
import static com.amazon.ion.impl.IonCursorTestUtilities.endStream;
import static com.amazon.ion.impl.IonCursorTestUtilities.fillContainer;
import static com.amazon.ion.impl.IonCursorTestUtilities.fillIntValue;
import static com.amazon.ion.impl.IonCursorTestUtilities.fillStringValue;
import static com.amazon.ion.impl.IonCursorTestUtilities.fillSymbolValue;
import static com.amazon.ion.impl.IonCursorTestUtilities.scalar;
import static com.amazon.ion.impl.IonCursorTestUtilities.startContainer;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand Down

0 comments on commit 71dd0ce

Please sign in to comment.