ARTEMIS-4747 remove unreachable code

This commit is contained in:
Justin Bertram 2024-06-19 12:16:09 -05:00 committed by clebertsuconic
parent 8d3508eaf2
commit 4c454e8abd
1 changed files with 9 additions and 17 deletions

View File

@ -35,7 +35,7 @@ import org.apache.activemq.artemis.utils.UTF8Util;
final class CompressedLargeMessageControllerImpl implements LargeMessageController {
private static final String OPERATION_NOT_SUPPORTED = "Operation not supported";
private static final String OPERATION_NOT_SUPPORTED = "Operation not supported over compressed large messages";
private final LargeMessageController bufferDelegate;
@ -114,10 +114,6 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
return dataInput;
}
private void positioningNotSupported() {
throw new IllegalStateException("Position not supported over compressed large messages");
}
@Override
public byte readByte() {
try {
@ -129,41 +125,37 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
@Override
public byte getByte(final int index) {
positioningNotSupported();
return 0;
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override
public void getBytes(final int index, final ActiveMQBuffer dst, final int dstIndex, final int length) {
positioningNotSupported();
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override
public void getBytes(final int index, final byte[] dst, final int dstIndex, final int length) {
positioningNotSupported();
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override
public void getBytes(final int index, final ByteBuffer dst) {
positioningNotSupported();
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override
public int getInt(final int index) {
positioningNotSupported();
return 0;
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override
public long getLong(final int index) {
positioningNotSupported();
return 0;
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override
public short getShort(final int index) {
positioningNotSupported();
return 0;
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override
@ -239,7 +231,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
@Override
public void setIndex(final int readerIndex, final int writerIndex) {
positioningNotSupported();
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}
@Override