You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Zoltan Meze (Jira)" <ji...@apache.org> on 2022/04/25 14:11:00 UTC

[jira] [Created] (SUREFIRE-2076) BufferOverflowException when encoding message with null runMode

Zoltan Meze created SUREFIRE-2076:
-------------------------------------

             Summary: BufferOverflowException when encoding message with null runMode
                 Key: SUREFIRE-2076
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2076
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin
    Affects Versions: 3.0.0-M6
            Reporter: Zoltan Meze


Per [#issuecomment-1099231382|https://github.com/apache/maven-surefire/pull/518#issuecomment-1099231382], [#issuecomment-1099706229|https://github.com/apache/maven-surefire/pull/518#issuecomment-1099706229], [#pullrequestreview-951134938|https://github.com/apache/maven-surefire/pull/518#pullrequestreview-951134938] and [#issuecomment-1108371215|https://github.com/apache/maven-surefire/pull/518#issuecomment-1108371215]

RunMode can be null causing BufferOverflowException when encoding message.
Related to similar issue with null testIds: [SUREFIRE-2056|https://issues.apache.org/jira/browse/SUREFIRE-2056]


Exception thrown:
{code:java}
java.nio.BufferOverflowException
	at java.nio.Buffer.nextPutIndex(Buffer.java:547)
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:172)
	at org.apache.maven.surefire.api.stream.AbstractStreamEncoder.encodeString(AbstractStreamEncoder.java:127)
	at org.apache.maven.surefire.api.stream.AbstractStreamEncoder.encodeStringData(AbstractStreamEncoder.java:171)
	at org.apache.maven.surefire.api.stream.AbstractStreamEncoder.encode(AbstractStreamEncoder.java:157)
	at org.apache.maven.surefire.booter.spi.EventChannelEncoder.encodeMessage(EventChannelEncoder.java:398)
	at org.apache.maven.surefire.booter.spi.EventChannelEncoder.setOutErr(EventChannelEncoder.java:188)
	at org.apache.maven.surefire.booter.spi.EventChannelEncoder.testOutput(EventChannelEncoder.java:183)
	at org.apache.maven.surefire.api.booter.ForkingRunListener.writeTestOutput(ForkingRunListener.java:113)
	at org.apache.maven.surefire.api.booter.ForkingRunListener.writeTestOutput(ForkingRunListener.java:44)
	at org.apache.maven.surefire.common.junit4.JUnit4RunListener.writeTestOutput(JUnit4RunListener.java:235)
	at org.apache.maven.surefire.api.report.ConsoleOutputCapture$ForwardingPrintStream.println(ConsoleOutputCapture.java:144)
{code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)