wieseljonas / java-libpst

Automatically exported from code.google.com/p/java-libpst
1 stars 1 forks source link

Help itens recipentTable #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
java.lang.ArrayIndexOutOfBoundsException: size: 413 index: 413

What is the expected output? What do you see instead?
-

What version of the product are you using? On what operating system?
r86 review. SO Linux Ubuntu 11.04. jdk 6.

Please provide any additional information below.
jdk 6

When I convert a list of the messages I receive this error.
In my code I do:
int sizeRecipients = msg.getNumberOfRecipients();                       
for (int i = 0 ; i < sizeRecipients; i++){               
  if (!msg.getRecipient(i).getSmtpAddress().isEmpty()) {
     //The error happens on this line. 
      ReceivedEmail +=  msg.getRecipient(i).getDisplayName() + " <" + msg.getRecipient(i).getSmtpAddress() + ">";
      if (i < (msg.getNumberOfRecipients() - 1)) ReceivedEmail += ", ";
  }
}
Reason. I have 416 (sizeRecipients) recipients in a message when I try to 
arrive at 413 and getRecipient (i). GetSmtpAddress (). IsEmpty (), the error 
occurs.
In line 981 PSTMessage class has the following passage:
HashMap <Integer, PSTTable7CItem> recipientDetails recipientTable.getItems = 
(). Get (recipientNumber);
I checked the index passed to the method is higher than the number of items in 
recipientTable.
Not tell you if this item is a problem, but the fix I did is en annex.
The error happens sometimes.
Sorry for the previous message!

Original issue reported on code.google.com by ToBac...@gmail.com on 4 Aug 2011 at 9:31

Attachments: