Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ public AlwaysStringKryoMessageConverter kryoOverrideMessageConverter() {

/**
* Even though this MessageConverter has nothing to do with Kryo it still shows
* how Kryo conversion can be customized/overriden since it simply overriding a
* how Kryo conversion can be customized/overridden since it simply overriding a
* converter for contentType 'application/x-java-object'.
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.springframework.messaging.support.GenericMessage;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

/**
* @author Gary Russell
Expand Down Expand Up @@ -127,14 +127,8 @@ void headerEmbeddingMissingHeader() throws Exception {
void badDecode() throws Exception {
byte[] bytes = new byte[] { (byte) 0xff, 99 };
Message<byte[]> message = new GenericMessage<>(bytes);
try {
EmbeddedHeaderUtils.extractHeaders(message, false);
fail("Exception expected");
}
catch (Exception e) {
String s = EmbeddedHeaderUtils.decodeExceptionMessage(message);
assertThat(e).isInstanceOf(BufferUnderflowException.class);
}
assertThatThrownBy(() -> EmbeddedHeaderUtils.extractHeaders(message, false))
.isInstanceOf(BufferUnderflowException.class);
}

}