You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2011/11/15 07:43:51 UTC

[jira] Closed: (SUREFIRE-775) ForkingRunListener throws ArrayIndexOutOfBoundsException

     [ https://jira.codehaus.org/browse/SUREFIRE-775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-775.
---------------------------------------

    Resolution: Fixed
      Assignee: Kristian Rosenvold

Fixed with unit test in r1202059

> ForkingRunListener throws ArrayIndexOutOfBoundsException
> --------------------------------------------------------
>
>                 Key: SUREFIRE-775
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-775
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.7+ (parallel) support, Maven Surefire Plugin
>    Affects Versions: 2.10
>            Reporter: Király Attila
>            Assignee: Kristian Rosenvold
>
> We came across this in wicketstuff project in a scala using module on jenkins CI when we tried to enable parallel test runs.
> Maybe the problem is that in [ForkingRunListener#info(String)|http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java?view=markup&pathrev=1126721#l212] if you pass a message with 1 byte length the allocated ByteBuffer will be too small: 6 byte in length.
> Relevant stacktrace part from jenkins:
> {noformat}
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
> 	at org.apache.maven.surefire.util.internal.ByteBuffer.append(ByteBuffer.java:45)
> 	at org.apache.maven.surefire.booter.ForkingRunListener.info(ForkingRunListener.java:223)
> 	at org.apache.maven.surefire.junitcore.ConcurrentReporterManager.writeTestOutput(ConcurrentReporterManager.java:175)
> 	at org.apache.maven.surefire.report.ConsoleOutputCapture$ForwardingPrintStream.write(ConsoleOutputCapture.java:56)
> 	at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
> 	at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)
> 	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:115)
> 	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:169)
> 	at java.io.PrintStream.newLine(PrintStream.java:478)
> 	at java.io.PrintStream.println(PrintStream.java:754)
> 	at scala.Console$.println(Console.scala:244)
> 	at scala.Predef$.println(Predef.scala:192)
> 	at org.wicketstuff.scala.sample.HomePage.<init>(HelloWicketWorld.scala:35)
> 	... 113 more
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira