ARTEMIS-1009 Fixing compatibility
there was an issue with running older clients Found by this testsuite: https://github.com/clebertsuconic/messaging-versioning this will fix further compatibility issues
This commit is contained in:
parent
973c519217
commit
94b47e370b
|
@ -514,7 +514,7 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
|
|||
// so we always need to take the BUFFER_HEADER_SPACE from packet impl into consideration
|
||||
endOfBodyPosition = writableBuffer.writerIndex() + BUFFER_HEADER_SPACE - 4;
|
||||
} else if (endOfBodyPosition <= 0) {
|
||||
endOfBodyPosition = BUFFER_HEADER_SPACE;
|
||||
endOfBodyPosition = BUFFER_HEADER_SPACE + DataConstants.SIZE_INT;
|
||||
}
|
||||
|
||||
buffer.setIndex(0, 0);
|
||||
|
|
|
@ -197,7 +197,7 @@ public class CoreMessageTest {
|
|||
empty2.receiveBuffer(buffer);
|
||||
|
||||
try {
|
||||
empty2.getBodyBuffer().readByte();
|
||||
empty2.getBodyBuffer().readLong();
|
||||
Assert.fail("should throw exception");
|
||||
} catch (Exception expected) {
|
||||
|
||||
|
|
|
@ -190,6 +190,8 @@ public class ConsumerTest extends ActiveMQTestBase {
|
|||
|
||||
Assert.assertEquals("hi", message2.getReadOnlyBodyBuffer().readString());
|
||||
|
||||
Assert.assertNull(consumer.receiveImmediate());
|
||||
|
||||
session.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue