This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 5a393a4baab284fca444fd13c8075bdf30b9b487
Author: tibordigana <tibordig...@apache.org>
AuthorDate: Wed Sep 30 15:01:27 2020 +0200

    removed the unused method parameter LegacyMasterProcessChannelEncoder
---
 .../booter/spi/LegacyMasterProcessChannelEncoder.java        | 12 +++++-------
 .../booter/spi/LegacyMasterProcessChannelEncoderTest.java    |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
index f8cb224..dba0f9b 100644
--- 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
+++ 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoder.java
@@ -314,10 +314,9 @@ public class LegacyMasterProcessChannelEncoder implements 
MasterProcessChannelEn
 
     private void encodeOpcode( ForkedProcessEventType eventType, boolean 
sendImmediately )
     {
-        CharsetEncoder encoder = DEFAULT_STREAM_ENCODING.newEncoder();
         int bufferMaxLength = estimateBufferLength( eventType, null, null, 0 );
         ByteBuffer result = ByteBuffer.allocate( bufferMaxLength );
-        encodeOpcode( encoder, result, eventType, null );
+        encodeOpcode( result, eventType, null );
         encodeAndPrintEvent( result, sendImmediately );
     }
 
@@ -421,7 +420,7 @@ public class LegacyMasterProcessChannelEncoder implements 
MasterProcessChannelEn
         encodeString( encoder, result, reportEntry.getNameText() );
         encodeString( encoder, result, reportEntry.getGroup() );
         encodeString( encoder, result, reportEntry.getMessage() );
-        encodeInteger( encoder, result, reportEntry.getElapsed() );
+        encodeInteger( result, reportEntry.getElapsed() );
 
         encode( encoder, result, stackTraceWrapper );
 
@@ -457,7 +456,7 @@ public class LegacyMasterProcessChannelEncoder implements 
MasterProcessChannelEn
         result.put( (byte) ':' );
     }
 
-    private static void encodeInteger( CharsetEncoder encoder, ByteBuffer 
result, Integer i )
+    private static void encodeInteger( ByteBuffer result, Integer i )
     {
         if ( i == null )
         {
@@ -473,7 +472,7 @@ public class LegacyMasterProcessChannelEncoder implements 
MasterProcessChannelEn
     static void encodeHeader( CharsetEncoder encoder, ByteBuffer result, 
ForkedProcessEventType operation,
                               RunMode runMode )
     {
-        encodeOpcode( encoder, result, operation, runMode );
+        encodeOpcode( result, operation, runMode );
         String charsetName = encoder.charset().name();
         result.put( (byte) charsetName.length() );
         result.put( (byte) ':' );
@@ -488,8 +487,7 @@ public class LegacyMasterProcessChannelEncoder implements 
MasterProcessChannelEn
      * @param operation opcode
      * @param runMode   run mode
      */
-    static void encodeOpcode( CharsetEncoder encoder, ByteBuffer result, 
ForkedProcessEventType operation,
-                              RunMode runMode )
+    static void encodeOpcode( ByteBuffer result, ForkedProcessEventType 
operation, RunMode runMode )
     {
         result.put( (byte) ':' );
         result.put( MAGIC_NUMBER_BYTES );
diff --git 
a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoderTest.java
 
b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoderTest.java
index 0262f3e..11f2d16 100644
--- 
a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoderTest.java
+++ 
b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/LegacyMasterProcessChannelEncoderTest.java
@@ -1007,7 +1007,7 @@ public class LegacyMasterProcessChannelEncoderTest
     {
         CharsetEncoder encoder = UTF_8.newEncoder();
         ByteBuffer result = ByteBuffer.allocate( 128 );
-        encodeOpcode( encoder, result, BOOTERCODE_TEST_ERROR, NORMAL_RUN );
+        encodeOpcode( result, BOOTERCODE_TEST_ERROR, NORMAL_RUN );
         assertThat( toString( result ) )
                 .isEqualTo( ":maven-surefire-event:" + (char) 10 + 
":test-error:" + (char) 10 + ":normal-run:" );
 

Reply via email to