Skip to content

Commit 17bdb5a

Browse files
ARROW-7429: [Java] Enhance code style checking for Java code (remove consecutive spaces)
This issue is opened in response to a discussion in #5861 (comment). We found the current style checking for Java code is not sufficient. So we want to enhace it in a series of "small" steps, in order to avoid having to change too many files at once. In this issue, we remove consecutive spaces between tokens, so that tokens are separated by single spaces. Closes #6060 from liyafan82/fly_1217_style and squashes the following commits: d14b8d5 <emkornfield> Merge branch 'master' into fly_1217_style 6d4fe3d <liyafan82> Enhance code style checking for Java code (remove consecutive spaces) Lead-authored-by: liyafan82 <[email protected]> Co-authored-by: emkornfield <[email protected]> Signed-off-by: Micah Kornfield <[email protected]>
1 parent 7f905a6 commit 17bdb5a

File tree

44 files changed

+131
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+131
-127
lines changed

java/adapter/avro/src/main/java/org/apache/arrow/AvroToArrowConfigBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929
public class AvroToArrowConfigBuilder {
3030

31-
private BufferAllocator allocator;
31+
private BufferAllocator allocator;
3232

3333
private int targetBatchSize;
3434

java/adapter/avro/src/main/java/org/apache/arrow/AvroToArrowUtils.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -183,98 +183,98 @@ private static Consumer createConsumer(
183183
break;
184184
case STRING:
185185
arrowType = new ArrowType.Utf8();
186-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
186+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
187187
vector = createVector(consumerVector, fieldType, name, allocator);
188-
consumer = new AvroStringConsumer((VarCharVector) vector);
188+
consumer = new AvroStringConsumer((VarCharVector) vector);
189189
break;
190190
case FIXED:
191191
if (logicalType instanceof LogicalTypes.Decimal) {
192192
arrowType = createDecimalArrowType((LogicalTypes.Decimal) logicalType);
193-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
193+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
194194
vector = createVector(consumerVector, fieldType, name, allocator);
195195
consumer = new AvroDecimalConsumer.FixedDecimalConsumer((DecimalVector) vector, schema.getFixedSize());
196196
} else {
197197
arrowType = new ArrowType.FixedSizeBinary(schema.getFixedSize());
198-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
198+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
199199
vector = createVector(consumerVector, fieldType, name, allocator);
200200
consumer = new AvroFixedConsumer((FixedSizeBinaryVector) vector, schema.getFixedSize());
201201
}
202202
break;
203203
case INT:
204204
if (logicalType instanceof LogicalTypes.Date) {
205205
arrowType = new ArrowType.Date(DateUnit.DAY);
206-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
206+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
207207
vector = createVector(consumerVector, fieldType, name, allocator);
208208
consumer = new AvroDateConsumer((DateDayVector) vector);
209209
} else if (logicalType instanceof LogicalTypes.TimeMillis) {
210210
arrowType = new ArrowType.Time(TimeUnit.MILLISECOND, 32);
211-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
211+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
212212
vector = createVector(consumerVector, fieldType, name, allocator);
213213
consumer = new AvroTimeMillisConsumer((TimeMilliVector) vector);
214214
} else {
215215
arrowType = new ArrowType.Int(32, /*signed=*/true);
216-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
216+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
217217
vector = createVector(consumerVector, fieldType, name, allocator);
218218
consumer = new AvroIntConsumer((IntVector) vector);
219219
}
220220
break;
221221
case BOOLEAN:
222222
arrowType = new ArrowType.Bool();
223-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
223+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
224224
vector = createVector(consumerVector, fieldType, name, allocator);
225225
consumer = new AvroBooleanConsumer((BitVector) vector);
226226
break;
227227
case LONG:
228228
if (logicalType instanceof LogicalTypes.TimeMicros) {
229229
arrowType = new ArrowType.Time(TimeUnit.MICROSECOND, 64);
230-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
230+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
231231
vector = createVector(consumerVector, fieldType, name, allocator);
232-
consumer = new AvroTimeMicroConsumer((TimeMicroVector) vector);
232+
consumer = new AvroTimeMicroConsumer((TimeMicroVector) vector);
233233
} else if (logicalType instanceof LogicalTypes.TimestampMillis) {
234234
arrowType = new ArrowType.Timestamp(TimeUnit.MILLISECOND, null);
235-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
235+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
236236
vector = createVector(consumerVector, fieldType, name, allocator);
237-
consumer = new AvroTimestampMillisConsumer((TimeStampMilliVector) vector);
237+
consumer = new AvroTimestampMillisConsumer((TimeStampMilliVector) vector);
238238
} else if (logicalType instanceof LogicalTypes.TimestampMicros) {
239239
arrowType = new ArrowType.Timestamp(TimeUnit.MICROSECOND, null);
240-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
240+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
241241
vector = createVector(consumerVector, fieldType, name, allocator);
242-
consumer = new AvroTimestampMicrosConsumer((TimeStampMicroVector) vector);
242+
consumer = new AvroTimestampMicrosConsumer((TimeStampMicroVector) vector);
243243
} else {
244244
arrowType = new ArrowType.Int(64, /*signed=*/true);
245-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
245+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
246246
vector = createVector(consumerVector, fieldType, name, allocator);
247-
consumer = new AvroLongConsumer((BigIntVector) vector);
247+
consumer = new AvroLongConsumer((BigIntVector) vector);
248248
}
249249
break;
250250
case FLOAT:
251-
arrowType = new ArrowType.FloatingPoint(SINGLE);
252-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
251+
arrowType = new ArrowType.FloatingPoint(SINGLE);
252+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
253253
vector = createVector(consumerVector, fieldType, name, allocator);
254254
consumer = new AvroFloatConsumer((Float4Vector) vector);
255255
break;
256256
case DOUBLE:
257257
arrowType = new ArrowType.FloatingPoint(DOUBLE);
258-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
258+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
259259
vector = createVector(consumerVector, fieldType, name, allocator);
260260
consumer = new AvroDoubleConsumer((Float8Vector) vector);
261261
break;
262262
case BYTES:
263263
if (logicalType instanceof LogicalTypes.Decimal) {
264264
arrowType = createDecimalArrowType((LogicalTypes.Decimal) logicalType);
265-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
265+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
266266
vector = createVector(consumerVector, fieldType, name, allocator);
267267
consumer = new AvroDecimalConsumer.BytesDecimalConsumer((DecimalVector) vector);
268268
} else {
269269
arrowType = new ArrowType.Binary();
270-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
270+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
271271
vector = createVector(consumerVector, fieldType, name, allocator);
272272
consumer = new AvroBytesConsumer((VarBinaryVector) vector);
273273
}
274274
break;
275275
case NULL:
276276
arrowType = new ArrowType.Null();
277-
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
277+
fieldType = new FieldType(nullable, arrowType, /*dictionary=*/null, getMetaData(schema));
278278
vector = fieldType.createNewSingleVector(name, allocator, /*schemaCallback=*/null);
279279
consumer = new AvroNullConsumer((NullVector) vector);
280280
break;
@@ -308,7 +308,7 @@ private static Consumer createSkipConsumer(Schema schema) {
308308
case UNION:
309309
List<Consumer> unionDelegates = schema.getTypes().stream().map(s ->
310310
createSkipConsumer(s)).collect(Collectors.toList());
311-
skipFunction = decoder -> unionDelegates.get(decoder.readInt()).consume(decoder);
311+
skipFunction = decoder -> unionDelegates.get(decoder.readInt()).consume(decoder);
312312

313313
break;
314314
case ARRAY:
@@ -326,7 +326,7 @@ private static Consumer createSkipConsumer(Schema schema) {
326326
skipFunction = decoder -> {
327327
for (long i = decoder.skipMap(); i != 0; i = decoder.skipMap()) {
328328
for (long j = 0; j < i; j++) {
329-
decoder.skipString(); // Discard key
329+
decoder.skipString(); // Discard key
330330
valueDelegate.consume(decoder);
331331
}
332332
}

java/adapter/orc/src/main/java/org/apache/arrow/adapter/orc/OrcReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public OrcReader(String filePath, BufferAllocator allocator) throws IOException,
5555
* @param rowNumber the rows number to seek
5656
* @return true if seek operation is succeeded
5757
*/
58-
public boolean seek(int rowNumber) throws IllegalArgumentException {
58+
public boolean seek(int rowNumber) throws IllegalArgumentException {
5959
return jniWrapper.seek(nativeInstanceId, rowNumber);
6060
}
6161

@@ -79,7 +79,7 @@ public ArrowReader nextStripeReader(long batchSize) throws IllegalArgumentExcept
7979
*
8080
* @return number of stripes
8181
*/
82-
public int getNumberOfStripes() throws IllegalArgumentException {
82+
public int getNumberOfStripes() throws IllegalArgumentException {
8383
return jniWrapper.getNumberOfStripes(nativeInstanceId);
8484
}
8585

java/algorithm/src/main/java/org/apache/arrow/algorithm/deduplicate/DeduplicationUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static <V extends ValueVector> void populateRunStartIndicators(V vector,
6060
* @param runLengths the run length vector to populate.
6161
* @param valueCount the number of values in the bit set.
6262
*/
63-
public static void populateRunLengths(ArrowBuf runStarts, IntVector runLengths, int valueCount) {
63+
public static void populateRunLengths(ArrowBuf runStarts, IntVector runLengths, int valueCount) {
6464
int curStart = 0;
6565
int lengthIndex = 0;
6666
for (int i = 1; i < valueCount; i++) {

java/algorithm/src/main/java/org/apache/arrow/algorithm/sort/CompositeVectorComparator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* been used.
3030
* </p>
3131
*/
32-
public class CompositeVectorComparator extends VectorValueComparator<ValueVector> {
32+
public class CompositeVectorComparator extends VectorValueComparator<ValueVector> {
3333

3434
private final VectorValueComparator[] innerComparators;
3535

java/algorithm/src/main/java/org/apache/arrow/algorithm/sort/OffHeapIntStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public int getCount() {
6666
}
6767

6868
@Override
69-
public void close() {
69+
public void close() {
7070
intVector.close();
7171
}
7272
}

java/algorithm/src/test/java/org/apache/arrow/algorithm/dictionary/TestHashTableDictionaryEncoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void testEncodeAndDecode() {
103103

104104
// perform decoding
105105
Dictionary dict = new Dictionary(dictionary, new DictionaryEncoding(1L, false, null));
106-
try (VarCharVector decodedVector = (VarCharVector) DictionaryEncoder.decode(encodedVector, dict)) {
106+
try (VarCharVector decodedVector = (VarCharVector) DictionaryEncoder.decode(encodedVector, dict)) {
107107

108108
// verify decoding results
109109
assertEquals(encodedVector.getValueCount(), decodedVector.getValueCount());
@@ -161,7 +161,7 @@ public void testEncodeAndDecodeWithNull() {
161161

162162
// perform decoding
163163
Dictionary dict = new Dictionary(dictionary, new DictionaryEncoding(1L, false, null));
164-
try (VarCharVector decodedVector = (VarCharVector) DictionaryEncoder.decode(encodedVector, dict)) {
164+
try (VarCharVector decodedVector = (VarCharVector) DictionaryEncoder.decode(encodedVector, dict)) {
165165
// verify decoding results
166166
assertEquals(encodedVector.getValueCount(), decodedVector.getValueCount());
167167
for (int i = 0; i < VECTOR_LENGTH; i++) {

java/dev/checkstyle/checkstyle.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@
207207
<property name="option" value="top"/>
208208
<property name="sortStaticImportsAlphabetically" value="true"/>
209209
</module>
210+
<module name="SingleSpaceSeparator">
211+
<property name="validateComments" value="true"/>
212+
</module>
210213
<module name="MethodParamPad"/>
211214
<module name="OperatorWrap">
212215
<property name="option" value="eol"/>

java/flight/src/main/java/org/apache/arrow/flight/ArrowMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public ArrowRecordBatch asRecordBatch() throws IOException {
187187
ArrowBuf underlying = bufs.get(0);
188188

189189
underlying.getReferenceManager().retain();
190-
return MessageSerializer.deserializeRecordBatch(message, underlying);
190+
return MessageSerializer.deserializeRecordBatch(message, underlying);
191191
}
192192

193193
public ArrowDictionaryBatch asDictionaryBatch() throws IOException {

java/flight/src/main/java/org/apache/arrow/flight/example/FlightHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public FlightInfo getFlightInfo(final Location l) {
104104
l));
105105
i++;
106106
}
107-
return new FlightInfo(schema, descriptor, endpoints, bytes, records);
107+
return new FlightInfo(schema, descriptor, endpoints, bytes, records);
108108
}
109109

110110
@Override

java/gandiva/src/main/java/org/apache/arrow/gandiva/evaluator/JniLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static long getDefaultConfiguration() throws GandivaException {
119119
if (defaultConfiguration == 0L) {
120120
synchronized (ConfigurationBuilder.class) {
121121
if (defaultConfiguration == 0L) {
122-
JniLoader.getInstance(); // setup
122+
JniLoader.getInstance(); // setup
123123
defaultConfiguration = new ConfigurationBuilder()
124124
.buildConfigInstance();
125125
}

java/gandiva/src/main/java/org/apache/arrow/gandiva/expression/InNode.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,23 @@ public GandivaTypes.TreeNode toProtobuf() throws GandivaException {
7272
inNode.setField(fieldNode);
7373

7474
if (intValues != null) {
75-
GandivaTypes.IntConstants.Builder intConstants = GandivaTypes.IntConstants.newBuilder();
75+
GandivaTypes.IntConstants.Builder intConstants = GandivaTypes.IntConstants.newBuilder();
7676
intValues.stream().forEach(val -> intConstants.addIntValues(GandivaTypes.IntNode.newBuilder()
7777
.setValue(val).build()));
7878
inNode.setIntValues(intConstants.build());
7979
} else if (longValues != null) {
80-
GandivaTypes.LongConstants.Builder longConstants = GandivaTypes.LongConstants.newBuilder();
80+
GandivaTypes.LongConstants.Builder longConstants = GandivaTypes.LongConstants.newBuilder();
8181
longValues.stream().forEach(val -> longConstants.addLongValues(GandivaTypes.LongNode.newBuilder()
8282
.setValue(val).build()));
8383
inNode.setLongValues(longConstants.build());
8484
} else if (stringValues != null) {
85-
GandivaTypes.StringConstants.Builder stringConstants = GandivaTypes.StringConstants
85+
GandivaTypes.StringConstants.Builder stringConstants = GandivaTypes.StringConstants
8686
.newBuilder();
8787
stringValues.stream().forEach(val -> stringConstants.addStringValues(GandivaTypes.StringNode
8888
.newBuilder().setValue(ByteString.copyFrom(val.getBytes(charset))).build()));
8989
inNode.setStringValues(stringConstants.build());
9090
} else if (binaryValues != null) {
91-
GandivaTypes.BinaryConstants.Builder binaryConstants = GandivaTypes.BinaryConstants
91+
GandivaTypes.BinaryConstants.Builder binaryConstants = GandivaTypes.BinaryConstants
9292
.newBuilder();
9393
binaryValues.stream().forEach(val -> binaryConstants.addBinaryValues(GandivaTypes.BinaryNode
9494
.newBuilder().setValue(ByteString.copyFrom(val)).build()));

java/gandiva/src/test/java/org/apache/arrow/gandiva/evaluator/DecimalTypeUtilTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void testOutputTypesForMultiply() {
7676
@Test
7777
public void testOutputTypesForMod() {
7878
ArrowType.Decimal operand1 = getDecimal(30, 10);
79-
ArrowType.Decimal operand2 = getDecimal(28 , 7);
79+
ArrowType.Decimal operand2 = getDecimal(28, 7);
8080
ArrowType.Decimal resultType = DecimalTypeUtil.getResultTypeForOperation(DecimalTypeUtil
8181
.OperationType.MOD, operand1, operand2);
8282
Assert.assertTrue(getDecimal(30, 10).equals(resultType));

java/gandiva/src/test/java/org/apache/arrow/gandiva/evaluator/FilterProjectTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public void testSimpleSV16() throws GandivaException, Exception {
6060
int numRows = 16;
6161
byte[] validity = new byte[]{(byte) 255, 0};
6262
// second half is "undefined"
63-
int[] aValues = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
64-
int[] bValues = new int[]{2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 14, 15};
63+
int[] aValues = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
64+
int[] bValues = new int[]{2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 14, 15};
6565
int[] expected = {3, 7, 11, 15};
6666

6767
verifyTestCaseFor16(filter, projector, numRows, validity, aValues, bValues, expected);

java/gandiva/src/test/java/org/apache/arrow/gandiva/evaluator/ProjectorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ public void testTimeNull() throws GandivaException, Exception {
10231023
}
10241024

10251025
@Test
1026-
public void testTimeEquals() throws GandivaException, Exception { /*
1026+
public void testTimeEquals() throws GandivaException, Exception { /*
10271027
* when isnotnull(x) then x
10281028
* else y
10291029
*/

java/memory/src/main/java/io/netty/buffer/NettyArrowBuf.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/**
3636
* Netty specific wrapper over ArrowBuf for use in Netty framework.
3737
*/
38-
public class NettyArrowBuf extends AbstractByteBuf implements AutoCloseable {
38+
public class NettyArrowBuf extends AbstractByteBuf implements AutoCloseable {
3939

4040
private final ArrowBuf arrowBuf;
4141
private final ArrowByteBufAllocator arrowByteBufAllocator;
@@ -203,7 +203,7 @@ public int nioBufferCount() {
203203

204204
@Override
205205
public ByteBuffer internalNioBuffer(int index, int length) {
206-
ByteBuffer nioBuf = getDirectBuffer(index);
206+
ByteBuffer nioBuf = getDirectBuffer(index);
207207
// Follows convention from other ByteBuf implementations.
208208
return (ByteBuffer)nioBuf.clear().limit(length);
209209
}
@@ -428,7 +428,7 @@ public short getShort(int index) {
428428

429429
@Override
430430
protected int _getIntLE(int index) {
431-
int value = getInt(index);
431+
int value = getInt(index);
432432
return Integer.reverseBytes(value);
433433
}
434434

java/memory/src/main/java/org/apache/arrow/memory/BaseAllocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public synchronized void close() {
462462
// Is there unaccounted-for outstanding allocation?
463463
final long allocated = getAllocatedMemory();
464464
if (allocated > 0) {
465-
String msg = String.format("Memory was leaked by query. Memory leaked: (%d)\n%s", allocated,
465+
String msg = String.format("Memory was leaked by query. Memory leaked: (%d)\n%s", allocated,
466466
toString());
467467
logger.error(msg);
468468
throw new IllegalStateException(msg);

java/memory/src/main/java/org/apache/arrow/memory/BufferLedger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* ArrowBufs managed by this reference manager share a common
3636
* fate (same reference count).
3737
*/
38-
public class BufferLedger implements ValueWithKeyIncluded<BaseAllocator>, ReferenceManager {
38+
public class BufferLedger implements ValueWithKeyIncluded<BaseAllocator>, ReferenceManager {
3939
private final IdentityHashMap<ArrowBuf, Object> buffers =
4040
BaseAllocator.DEBUG ? new IdentityHashMap<>() : null;
4141
private static final AtomicLong LEDGER_ID_GENERATOR = new AtomicLong(0);

java/memory/src/main/java/org/apache/arrow/memory/rounding/SegmentRoundingPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* The rounding policy that each buffer size must a multiple of the segment size.
2424
*/
25-
public class SegmentRoundingPolicy implements RoundingPolicy {
25+
public class SegmentRoundingPolicy implements RoundingPolicy {
2626

2727
/**
2828
* The minimal segment size.

java/memory/src/test/java/io/netty/buffer/TestNettyArrowBuf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void testSetLEValues() {
7878
ArrowBuf buf = allocator.buffer(20);
7979
) {
8080
NettyArrowBuf nettyBuf = buf.asNettyBuffer();
81-
int [] intVals = new int[] {Integer.MIN_VALUE, Short.MIN_VALUE - 1, Short.MIN_VALUE, 0 ,
81+
int [] intVals = new int[] {Integer.MIN_VALUE, Short.MIN_VALUE - 1, Short.MIN_VALUE, 0 ,
8282
Short.MAX_VALUE , Short.MAX_VALUE + 1, Integer.MAX_VALUE};
8383
for (int intValue :intVals ) {
8484
nettyBuf._setInt(0, intValue);

0 commit comments

Comments
 (0)