You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/09/11 17:53:59 UTC

[1/2] activemq-artemis git commit: NO-JIRA - Update SimpleString to give a more useful error message

Repository: activemq-artemis
Updated Branches:
  refs/heads/master fe8a4b78c -> 71390fea4


NO-JIRA - Update SimpleString to give a more useful error message

Currently we get.
java.lang.IndexOutOfBoundsException: null
at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:183)
at org.apache.activemq.artemis.api.core.SimpleString$ByteBufSimpleStringPool.create(SimpleString.java:584)
....

Should be
java.lang.IndexOutOfBoundsException: Error reading in simpleString, length=YYY is greater than readableBytes=XXX
at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:183)
at org.apache.activemq.artemis.api.core.SimpleString$ByteBufSimpleStringPool.create(SimpleString.java:584)
...

Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/153e0a02
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/153e0a02
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/153e0a02

Branch: refs/heads/master
Commit: 153e0a0260c9b143a2ed21b80b4fc07af5f18428
Parents: fe8a4b7
Author: henock <he...@users.noreply.github.com>
Authored: Tue Sep 11 14:48:17 2018 +0100
Committer: GitHub <no...@github.com>
Committed: Tue Sep 11 14:48:17 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/activemq/artemis/api/core/SimpleString.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/153e0a02/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
index 96e48b8..aabffa1 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
@@ -180,7 +180,7 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
 
    public static SimpleString readSimpleString(final ByteBuf buffer, final int length) {
       if (length > buffer.readableBytes()) {
-         throw new IndexOutOfBoundsException();
+         throw new IndexOutOfBoundsException("Error reading in simpleString, length=" + length + " is greater than readableBytes=" + buffer.readableBytes());
       }
       byte[] data = new byte[length];
       buffer.readBytes(data);


[2/2] activemq-artemis git commit: This closes #2303

Posted by cl...@apache.org.
This closes #2303


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/71390fea
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/71390fea
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/71390fea

Branch: refs/heads/master
Commit: 71390fea4d92232b75461d8c6ed04f03ba18961a
Parents: fe8a4b7 153e0a0
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Sep 11 13:53:43 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Sep 11 13:53:43 2018 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/artemis/api/core/SimpleString.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------