eolivelli commented on a change in pull request #240: [SUREFIRE-1658] TCP/IP 
Channel for forked Surefire JVM. Extensions API and SPI. Polymorphism for 
remote and local process communication.
URL: https://github.com/apache/maven-surefire/pull/240#discussion_r377606563
 
 

 ##########
 File path: 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestLessInputStreamBuilderTest.java
 ##########
 @@ -137,15 +138,51 @@ public void shouldDecodeTwoCommands()
             throws IOException
     {
         TestLessInputStreamBuilder builder = new TestLessInputStreamBuilder();
-        TestLessInputStream pluginIs = builder.build();
+        final TestLessInputStream pluginIs = builder.build();
+        InputStream is = new InputStream()
+        {
+            private byte[] buffer;
+            private int idx;
+
+            @Override
+            public int read() throws IOException
+            {
+                if ( buffer == null )
+                {
+                    idx = 0;
+                    Command cmd = pluginIs.readNextCommand();
+                    if ( cmd == null )
+                    {
+                        buffer = null;
 
 Review comment:
   Buffer is already null here

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to