geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick McGuire (JIRA)" <j...@apache.org>
Subject [jira] Updated: (GERONIMO-4144) ArrayIndexOutOfBoundsException on InternetHeaders.addHeaderLine
Date Mon, 23 Jun 2008 12:22:45 GMT

     [ https://issues.apache.org/jira/browse/GERONIMO-4144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick McGuire updated GERONIMO-4144:
-----------------------------------

    Attachment: TestAddHeader.java

Simple test program to attempt to reproduce this problem. 

> ArrayIndexOutOfBoundsException on InternetHeaders.addHeaderLine
> ---------------------------------------------------------------
>
>                 Key: GERONIMO-4144
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4144
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>    Affects Versions: 2.1.1
>            Reporter: Stefano Bagnara
>            Assignee: Rick McGuire
>         Attachments: message.txt, TestAddHeader.java
>
>
> I get this one when parsing the attached message using this code:
>             byte[] messageBytes = mailString.getBytes("US-ASCII");
>             mm = new MimeMessage(null, new ByteArrayInputStream(
>                     messageBytes));
> (mailString contains the string contained in the txt attachment)
> java.lang.ArrayIndexOutOfBoundsException: -1
> 	at java.util.ArrayList.get(ArrayList.java:324)
> 	at javax.mail.internet.InternetHeaders.addHeaderLine(InternetHeaders.java:538)
> 	at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:124)
> 	at javax.mail.internet.InternetHeaders.<init>(InternetHeaders.java:99)
> 	at javax.mail.internet.MimeMessage.createInternetHeaders(MimeMessage.java:1457)
> 	at javax.mail.internet.MimeMessage.parse(MimeMessage.java:265)
> 	at javax.mail.internet.MimeMessage.<init>(MimeMessage.java:153)
> 	at org.apache.james.imapserver.codec.decode.imap4rev1.AppendCommandParser.mimeMessage(AppendCommandParser.java:102)
> 	at org.apache.james.imapserver.codec.decode.imap4rev1.AppendCommandParser.decode(AppendCommandParser.java:123)
> 	at org.apache.james.imapserver.codec.decode.base.AbstractImapCommandParser.parse(AbstractImapCommandParser.java:112)
> 	at org.apache.james.imapserver.codec.decode.main.DefaultImapDecoder.decodeCommandNamed(DefaultImapDecoder.java:113)
> 	at org.apache.james.imapserver.codec.decode.main.DefaultImapDecoder.decodeCommandTagged(DefaultImapDecoder.java:81)
> 	at org.apache.james.imapserver.codec.decode.main.DefaultImapDecoder.decode(DefaultImapDecoder.java:60)
> 	at org.apache.james.experimental.imapserver.ImapRequestHandler.doProcessRequest(ImapRequestHandler.java:136)
> 	at org.apache.james.experimental.imapserver.ImapRequestHandler.handleRequest(ImapRequestHandler.java:99)
> 	at org.apache.james.experimental.imapserver.ExperimentalHostSystem$Session.readLine(ExperimentalHostSystem.java:247)
> 	at org.apache.james.test.functional.imap.ProtocolSession$ServerResponse.readLine(ProtocolSession.java:331)
> 	at org.apache.james.test.functional.imap.ProtocolSession$ServerResponse.checkResponse(ProtocolSession.java:295)
> 	at org.apache.james.test.functional.imap.ProtocolSession$ServerResponse.testProtocol(ProtocolSession.java:285)
> 	at org.apache.james.test.functional.imap.ProtocolSession.runSessions(ProtocolSession.java:86)
> 	at org.apache.james.test.functional.imap.AbstractProtocolTest.runSessions(AbstractProtocolTest.java:100)
> 	at org.apache.james.test.functional.imap.SimpleScriptedTestProtocol.scriptTest(SimpleScriptedTestProtocol.java:68)
> 	at org.apache.james.test.functional.imap.AbstractTestUidSearch.testSearchAtomsUS(AbstractTestUidSearch.java:33)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

-- 
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