Author: jicken
Date: 2011-06-09 15:59:52 -0400 (Thu, 09 Jun 2011)
New Revision: 10790
Modified:
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java
Log:
worked around an ArrayIndexOutOfBoundsException as I had originally in mind
Modified:
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java
===================================================================
---
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java 2011-06-09
19:28:20 UTC (rev 10789)
+++
branches/Branch_2_2_EAP_export_tool/src/main/org/hornetq/core/persistence/tools/ManageDataTool.java 2011-06-09
19:59:52 UTC (rev 10790)
@@ -380,7 +380,8 @@
private static MessageType getMessage(MessagesExportType journalType, RecordInfo
info)
{
List<MessageType> messages = journalType.getMessage();
- return messages.get(messages.indexOf(new MessageType(info.id)));
+ final int index = messages.indexOf(new MessageType(info.id));
+ return index == -1 ? null : messages.get(index);
}
private static void handleAckRef(MessagesExportType journalType, RecordInfo info)