activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dieter Vrancken (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-1580) ArrayOutOfBoundsException in ActiveMQInputStream
Date Wed, 06 Feb 2008 11:16:35 GMT
ArrayOutOfBoundsException in ActiveMQInputStream
------------------------------------------------

                 Key: AMQ-1580
                 URL: https://issues.apache.org/activemq/browse/AMQ-1580
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.0.0
         Environment: Ubuntu 7.10 / i686
Sun Java 1.6.0_03
            Reporter: Dieter Vrancken
            Priority: Critical
         Attachments: Crash.java

When using JMS streaming, an ArrayOutOfBoundsException occurs in ActiveMQInputStream if the
length of the streamed content is exactly a multiple of the chunk size sent by ActiveMQOutputStream
(64KB at the moment).

The last message received by fillBuffer in such a case has a bodyLength of 0, so
  buffer = new byte[0]; // line 225
  pos = 0; // line 227
and in the next invocation of read()
  return buffer[pos]; // line 180
fails with:
  java.lang.ArrayIndexOutOfBoundsException: 0
	at org.apache.activemq.ActiveMQInputStream.read(ActiveMQInputStream.java:180)
	at Crash.main(Crash.java:54)

Attached is Crash.java which produces the exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message