Issue Details (XML | Word | Printable)

Key: JAMES-144
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Rich
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JAMES Server

POP3Handler breaks with message numbers out of bounds

Created: 13/Dec/03 03:41 AM   Updated: 05/Jun/04 08:06 PM
Return to search
Component/s: POP3Server
Affects Version/s: 2.1, 2.1.3, 2.2.0
Fix Version/s: 2.2.0

Time Tracking:
Not Specified

Environment:
Operating System: Other
Platform: All

Bugzilla Id: 25489
Resolution Date: 13/Apr/04 09:32 PM


 Description  « Hide
When, for instance,
LIST 4
is given as a command when the mailbox contains only two messages, the response
should be
-ERR Message (4) does not exist.
But instead it exits, breaking the connection ungracefully.

As I see it this is because the code catches ArrayIndexOutOfBoundsException.
But ArrayList.get() throws IndexOutOfBoundsException.

It appears that I have fixed this, for the most part, in my working copy by
changing ArrayIndexOutOfBoundsException to IndexOutOfBoundsException in the
five places where it occurs in POP3Handler.

Another problem, not as bad, is shown by the following sequence:
retr 0
-ERR Message (0) deleted.

I think the correct response should be:
-ERR Message (0) does not exist.

This would be a little more work to fix, and the problem is not as bad as the
former.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #109095 Tue Apr 13 21:37:52 UTC 2004 noel Fix JAMES-144. Was catching the wrong exception for an ArrayList. Also tweaked some non-critical response text for clarity/consistency. Thanks to Rich O'Hammer and Brill Pappin for helping to isolate the specifics.
Files Changed
MODIFY /james/server/branches/branch_2_1_fcs/src/java/org/apache/james/pop3server/POP3Handler.java