aghoussaini commented on PR #3270:
URL: https://github.com/apache/maven-surefire/pull/3270#issuecomment-3947710246
For the record, take a look at the old `decode()` method (pre-M5):
```java
public static Command decode(DataInputStream is) throws IOException {
...
String data = command.toDataTypeAsString(buffer);
return new Command(command, data); // stores raw string directly
}
```
The old protocol created `new Command(command, data)` directly with the raw
decoded string. It never went through `Shutdown.parameterOf()`. The Command
stored `"KILL"` (from `shutdownType.name()`), and `toShutdownData()` called
`Shutdown.valueOf("KILL")` which worked perfectly because `valueOf()` matches
enum names.
The new binary protocol (introduced in SUREFIRE-1847) added `CommandDecoder`
which introduced `Shutdown.parameterOf()` in the decoding path — but
`parameterOf()` matches on param strings ("kill"), not enum names ("KILL"). The
mismatch was introduced at that point.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]