Commit 97bb755a authored by afreyssin's avatar afreyssin

Bug fix (JORAM-285): The encoded size is incoherent with the encode/decode....

Bug fix (JORAM-285): The encoded size is incoherent with the encode/decode. This size is too large and hides an issue in Queue class (JORAM-284).
parent fd93d76e
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2016 ScalAgent Distributed Technologies * Copyright (C) 2001 - 2018 ScalAgent Distributed Technologies
* Copyright (C) 1996 - 2000 Dyade * Copyright (C) 1996 - 2000 Dyade
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -1313,6 +1313,8 @@ public abstract class Destination extends Agent implements DestinationMBean { ...@@ -1313,6 +1313,8 @@ public abstract class Destination extends Agent implements DestinationMBean {
} }
} }
// Encodable interface
public int getEncodedSize() throws Exception { public int getEncodedSize() throws Exception {
int encodedSize = super.getEncodedSize(); int encodedSize = super.getEncodedSize();
encodedSize += BOOLEAN_ENCODED_SIZE; encodedSize += BOOLEAN_ENCODED_SIZE;
...@@ -1328,7 +1330,7 @@ public abstract class Destination extends Agent implements DestinationMBean { ...@@ -1328,7 +1330,7 @@ public abstract class Destination extends Agent implements DestinationMBean {
if (dmqId != null) { if (dmqId != null) {
encodedSize += dmqId.getEncodedSize(); encodedSize += dmqId.getEncodedSize();
} }
encodedSize += LONG_ENCODED_SIZE * 5; encodedSize += LONG_ENCODED_SIZE * 4;
encodedSize += BOOLEAN_ENCODED_SIZE; encodedSize += BOOLEAN_ENCODED_SIZE;
if (interceptorsProp != null) { if (interceptorsProp != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment