sunm2n opened a new pull request, #23652:
URL: https://github.com/apache/kafka/pull/23652
Follow-up to #23617 (storage tests). This applies the same replacement to
the server tests, in line with #23242 (streams) and #23344 (tools).
The server production code has no remaining uses of these methods.
Collections.singletonList and singleton become List.of and Set.of, and
Collections.emptyList and emptyMap become List.of() and Map.of().
**Not changed**
- Collections.singletonMap(SSL_CIPHER_SUITES_CONFIG, null) in RequestTest
passes a null value on purpose, and Map.of rejects null values.
- ClientQuotasRequestTest keeps Collections.singletonMap because the user,
client-id and IP values can be null. The existing comments in that file
explain this.
- Arrays.asList in ShareGroupDLQStateManagerTest is out of scope here. One
of its two uses holds a null element, which List.of rejects.
**Verification**
- ./gradlew server:checkstyleTest server:spotlessCheck: passed
- KRaftTopicCreatorTest, AbstractKafkaConfigTest, MetadataRequestTest and
ProduceRequestTest: all passed
--
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]