Skip to content

Commit

Permalink
ARTEMIS-4747 remove unreachable code
Browse files Browse the repository at this point in the history
  • Loading branch information
jbertram authored and clebertsuconic committed Jun 20, 2024
1 parent 8d3508e commit 4c454e8
Showing 1 changed file with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

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;

Expand Down Expand Up @@ -114,10 +114,6 @@ private DataInputStream getStream() {
return dataInput;
}

private void positioningNotSupported() {
throw new IllegalStateException("Position not supported over compressed large messages");
}

@Override
public byte readByte() {
try {
Expand All @@ -129,41 +125,37 @@ public byte readByte() {

@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
Expand Down Expand Up @@ -239,7 +231,7 @@ public void writerIndex(final int writerIndex) {

@Override
public void setIndex(final int readerIndex, final int writerIndex) {
positioningNotSupported();
throw new IllegalStateException(OPERATION_NOT_SUPPORTED);
}

@Override
Expand Down

0 comments on commit 4c454e8

Please sign in to comment.