Skip to content

Commit e60fe99

Browse files
committed
remove BodyType which are duplicated of other body which simply don't copy the input content (to reduce build time)
1 parent 0dca9f4 commit e60fe99

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

test/s3-tests/src/it/java/software/amazon/awssdk/services/s3/regression/UploadStreamingRegressionTesting.java

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,6 @@ private TestRequestBody getRequestBody(BodyType bodyType, ContentSize contentSiz
354354
}
355355
case BUFFERS:
356356
case BUFFERS_REMAINING:
357-
case BUFFERS_UNSAFE:
358-
case BUFFERS_REMAINING_UNSAFE:
359-
case BYTES_UNSAFE:
360-
case BYTE_BUFFER_UNSAFE:
361-
case REMAINING_BYTE_BUFFER_UNSAFE:
362357
case BLOCKING_INPUT_STREAM:
363358
case BLOCKING_OUTPUT_STREAM:
364359
case INPUTSTREAM_NO_LENGTH:
@@ -426,25 +421,6 @@ private TestAsyncBody getAsyncRequestBody(BodyType bodyType, ContentSize content
426421
byte[] crcArray = Arrays.copyOfRange(content, offset, content.length);
427422
return new TestAsyncBody(asyncRequestBody, content.length - offset, crc32(crcArray), bodyType);
428423
}
429-
case BYTES_UNSAFE: {
430-
byte[] content = contentSize.byteContent();
431-
AsyncRequestBody asyncRequestBody = AsyncRequestBody.fromBytesUnsafe(content);
432-
return new TestAsyncBody(asyncRequestBody, content.length, contentSize.precalculatedCrc32(), bodyType);
433-
}
434-
case BYTE_BUFFER_UNSAFE: {
435-
byte[] content = contentSize.byteContent();
436-
AsyncRequestBody asyncRequestBody = AsyncRequestBody.fromByteBufferUnsafe(ByteBuffer.wrap(content));
437-
return new TestAsyncBody(asyncRequestBody, content.length, contentSize.precalculatedCrc32(), bodyType);
438-
}
439-
case REMAINING_BYTE_BUFFER_UNSAFE: {
440-
byte[] content = contentSize.byteContent();
441-
ByteBuffer buff = ByteBuffer.wrap(content);
442-
int offset = 2;
443-
buff.position(offset);
444-
AsyncRequestBody asyncRequestBody = AsyncRequestBody.fromRemainingByteBufferUnsafe(buff);
445-
byte[] crcArray = Arrays.copyOfRange(content, offset, content.length);
446-
return new TestAsyncBody(asyncRequestBody, content.length - offset, crc32(crcArray), bodyType);
447-
}
448424
case BUFFERS: {
449425
byte[] content1 = contentSize.byteContent();
450426
byte[] content2 = contentSize.byteContent();
@@ -468,32 +444,6 @@ private TestAsyncBody getAsyncRequestBody(BodyType bodyType, ContentSize content
468444
contentSize.precalculatedCrc32forBuffersAPI(),
469445
bodyType);
470446
}
471-
case BUFFERS_UNSAFE: {
472-
byte[] content1 = contentSize.byteContent();
473-
byte[] content2 = contentSize.byteContent();
474-
AsyncRequestBody asyncRequestBody = AsyncRequestBody.fromByteBuffersUnsafe(ByteBuffer.wrap(content1),
475-
ByteBuffer.wrap(content2));
476-
byte[] crcArray = new byte[content2.length + content2.length];
477-
System.arraycopy(content1, 0, crcArray, 0, content1.length);
478-
System.arraycopy(content2, 0, crcArray, content1.length, content2.length);
479-
return new TestAsyncBody(asyncRequestBody,
480-
content1.length + content2.length,
481-
contentSize.precalculatedCrc32forBuffersAPI(),
482-
bodyType);
483-
}
484-
case BUFFERS_REMAINING_UNSAFE: {
485-
byte[] content1 = contentSize.byteContent();
486-
byte[] content2 = contentSize.byteContent();
487-
AsyncRequestBody asyncRequestBody = AsyncRequestBody.fromRemainingByteBuffersUnsafe(ByteBuffer.wrap(content1),
488-
ByteBuffer.wrap(content2));
489-
byte[] crcArray = new byte[content2.length + content2.length];
490-
System.arraycopy(content1, 0, crcArray, 0, content1.length);
491-
System.arraycopy(content2, 0, crcArray, content1.length, content2.length);
492-
return new TestAsyncBody(asyncRequestBody,
493-
content1.length + content2.length,
494-
contentSize.precalculatedCrc32forBuffersAPI(),
495-
bodyType);
496-
}
497447
case BLOCKING_INPUT_STREAM: {
498448
byte[] content = contentSize.byteContent();
499449
long streamToSendLength = content.length;
@@ -629,14 +579,8 @@ enum BodyType {
629579
BYTE_BUFFER,
630580
REMAINING_BYTE_BUFFER,
631581

632-
BYTES_UNSAFE,
633-
BYTE_BUFFER_UNSAFE,
634-
REMAINING_BYTE_BUFFER_UNSAFE,
635-
636582
BUFFERS,
637583
BUFFERS_REMAINING,
638-
BUFFERS_UNSAFE,
639-
BUFFERS_REMAINING_UNSAFE,
640584

641585
BLOCKING_INPUT_STREAM,
642586
BLOCKING_OUTPUT_STREAM

0 commit comments

Comments
 (0)