@@ -34,7 +34,7 @@ import org.junit.jupiter.params.provider.CsvSource
3434
3535import java .util
3636import java .util .concurrent .atomic .AtomicInteger
37- import java .util .{Collections , Optional , Properties }
37+ import java .util .{Optional , Properties }
3838import scala .collection .Seq
3939import scala .concurrent .ExecutionException
4040import scala .util .Random
@@ -195,7 +195,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
195195 topicConfig = topicConfig)
196196
197197 // 4. create a topic with `remote.log.copy.disable=false` and have different local.retention.ms and retention.ms value,
198- // it should successfully creates the topic.
198+ // it should successfully create the topic.
199199 topicConfig.clear()
200200 topicConfig.put(TopicConfig .REMOTE_LOG_STORAGE_ENABLE_CONFIG , " true" )
201201 topicConfig.put(TopicConfig .LOCAL_LOG_RETENTION_MS_CONFIG , " 100" )
@@ -207,7 +207,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
207207 // 5. alter the config to `remote.log.copy.disable=true`, it should fail the config change
208208 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
209209 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName3),
210- util.Arrays .asList (
210+ util.List .of (
211211 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_COPY_DISABLE_CONFIG , " true" ),
212212 AlterConfigOp .OpType .SET ),
213213 ))
@@ -217,7 +217,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
217217
218218 // 6. alter the config to `remote.log.copy.disable=true` and local.retention.ms == retention.ms, it should work without error
219219 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName3),
220- util.Arrays .asList (
220+ util.List .of (
221221 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_COPY_DISABLE_CONFIG , " true" ),
222222 AlterConfigOp .OpType .SET ),
223223 new AlterConfigOp (new ConfigEntry (TopicConfig .LOCAL_LOG_RETENTION_MS_CONFIG , " 1000" ),
@@ -260,7 +260,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
260260 topicConfig = topicConfig)
261261
262262 // 4. create a topic with `remote.log.copy.disable=false` and have different local.retention.bytes and retention.bytes value,
263- // it should successfully creates the topic.
263+ // it should successfully create the topic.
264264 topicConfig.clear()
265265 topicConfig.put(TopicConfig .REMOTE_LOG_STORAGE_ENABLE_CONFIG , " true" )
266266 topicConfig.put(TopicConfig .LOCAL_LOG_RETENTION_BYTES_CONFIG , " 100" )
@@ -272,7 +272,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
272272 // 5. alter the config to `remote.log.copy.disable=true`, it should fail the config change
273273 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
274274 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName3),
275- util.Arrays .asList (
275+ util.List .of (
276276 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_COPY_DISABLE_CONFIG , " true" ),
277277 AlterConfigOp .OpType .SET ),
278278 ))
@@ -282,7 +282,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
282282
283283 // 6. alter the config to `remote.log.copy.disable=true` and local.retention.bytes == retention.bytes, it should work without error
284284 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName3),
285- util.Arrays .asList (
285+ util.List .of (
286286 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_COPY_DISABLE_CONFIG , " true" ),
287287 AlterConfigOp .OpType .SET ),
288288 new AlterConfigOp (new ConfigEntry (TopicConfig .LOCAL_LOG_RETENTION_BYTES_CONFIG , " 1000" ),
@@ -300,7 +300,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
300300
301301 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
302302 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
303- Collections .singleton (
303+ util. Set .of (
304304 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_STORAGE_ENABLE_CONFIG , " true" ),
305305 AlterConfigOp .OpType .SET ))
306306 )
@@ -322,7 +322,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
322322 TestUtils .createTopicWithAdmin(admin, testTopicName, brokers, controllerServers, numPartitions, numReplicationFactor)
323323 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
324324 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
325- Collections .singleton (
325+ util. Set .of (
326326 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_STORAGE_ENABLE_CONFIG , " true" ),
327327 AlterConfigOp .OpType .SET ))
328328 )
@@ -341,7 +341,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
341341
342342 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
343343 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
344- util.Arrays .asList (
344+ util.List .of (
345345 new AlterConfigOp (new ConfigEntry (TopicConfig .RETENTION_MS_CONFIG , " 200" ),
346346 AlterConfigOp .OpType .SET ),
347347 new AlterConfigOp (new ConfigEntry (TopicConfig .LOCAL_LOG_RETENTION_MS_CONFIG , " 100" ),
@@ -361,7 +361,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
361361
362362 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
363363 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
364- util.Arrays .asList (
364+ util.List .of (
365365 new AlterConfigOp (new ConfigEntry (TopicConfig .RETENTION_BYTES_CONFIG , " 200" ),
366366 AlterConfigOp .OpType .SET ),
367367 new AlterConfigOp (new ConfigEntry (TopicConfig .LOCAL_LOG_RETENTION_BYTES_CONFIG , " 100" ),
@@ -382,7 +382,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
382382 // inherited local retention ms is 1000
383383 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
384384 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
385- util.Arrays .asList (
385+ util.List .of (
386386 new AlterConfigOp (new ConfigEntry (TopicConfig .RETENTION_MS_CONFIG , " 200" ),
387387 AlterConfigOp .OpType .SET ),
388388 ))
@@ -401,7 +401,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
401401 // inherited local retention bytes is 1024
402402 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
403403 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
404- util.Arrays .asList (
404+ util.List .of (
405405 new AlterConfigOp (new ConfigEntry (TopicConfig .RETENTION_BYTES_CONFIG , " 512" ),
406406 AlterConfigOp .OpType .SET ),
407407 ))
@@ -420,7 +420,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
420420
421421 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
422422 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
423- util.Arrays .asList (
423+ util.List .of (
424424 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_STORAGE_ENABLE_CONFIG , " false" ),
425425 AlterConfigOp .OpType .SET ),
426426 ))
@@ -440,7 +440,7 @@ class RemoteTopicCrudTest extends IntegrationTestHarness {
440440
441441 val configs = new util.HashMap [ConfigResource , util.Collection [AlterConfigOp ]]()
442442 configs.put(new ConfigResource (ConfigResource .Type .TOPIC , testTopicName),
443- util.Arrays .asList (
443+ util.List .of (
444444 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_STORAGE_ENABLE_CONFIG , " false" ),
445445 AlterConfigOp .OpType .SET ),
446446 new AlterConfigOp (new ConfigEntry (TopicConfig .REMOTE_LOG_DELETE_ON_DISABLE_CONFIG , " true" ),
@@ -598,7 +598,7 @@ class MyRemoteLogMetadataManager extends NoOpRemoteLogMetadataManager {
598598 val timestamp = time.milliseconds()
599599 val startOffset = idx * recordsPerSegment
600600 val endOffset = startOffset + recordsPerSegment - 1
601- val segmentLeaderEpochs : util.Map [Integer , java.lang.Long ] = Collections .singletonMap (0 , 0L )
601+ val segmentLeaderEpochs : util.Map [Integer , java.lang.Long ] = util. Map .of (0 , 0L )
602602 segmentMetadataList.add(new RemoteLogSegmentMetadata (new RemoteLogSegmentId (topicIdPartition, Uuid .randomUuid()), startOffset, endOffset, timestamp, 0 , timestamp, segmentSize, Optional .empty(), RemoteLogSegmentState .COPY_SEGMENT_FINISHED , segmentLeaderEpochs))
603603 }
604604 segmentMetadataList.iterator()
0 commit comments