diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/Context.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/Context.kt index 5078f1d9..6669c1fe 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/Context.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/Context.kt @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 Exactpro (Exactpro Systems Limited) + * Copyright 2020-2024 Exactpro (Exactpro Systems Limited) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/ProtoContext.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/ProtoContext.kt index 6a1822cb..21f43671 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/ProtoContext.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/ProtoContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Exactpro (Exactpro Systems Limited) + * Copyright 2023-2024 Exactpro (Exactpro Systems Limited) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/TransportContext.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/TransportContext.kt index a85b5f64..ae55df92 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/TransportContext.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/TransportContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Exactpro (Exactpro Systems Limited) + * Copyright 2023-2024 Exactpro (Exactpro Systems Limited) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/entities/responses/MessageBatch.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/entities/responses/MessageBatch.kt index 694a803f..660c6ea1 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/entities/responses/MessageBatch.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/entities/responses/MessageBatch.kt @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 Exactpro (Exactpro Systems Limited) + * Copyright 2020-2024 Exactpro (Exactpro Systems Limited) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ package com.exactpro.th2.rptdataprovider.entities.responses import com.exactpro.cradle.messages.StoredMessage -import com.exactpro.cradle.messages.StoredMessageId import java.time.Instant data class MessageBatchWrapper( diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/ChainBuilder.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/ChainBuilder.kt index 71cf62e1..bd5c9fde 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/ChainBuilder.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/ChainBuilder.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Exactpro (Exactpro Systems Limited) + * Copyright 2021-2024 Exactpro (Exactpro Systems Limited) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import com.exactpro.th2.rptdataprovider.ProtoRawMessage import com.exactpro.th2.rptdataprovider.TransportMessageGroup import com.exactpro.th2.rptdataprovider.TransportRawMessage import com.exactpro.th2.rptdataprovider.entities.internal.CommonStreamName -import com.exactpro.th2.rptdataprovider.entities.internal.StreamName import com.exactpro.th2.rptdataprovider.entities.requests.SseMessageSearchRequest import com.exactpro.th2.rptdataprovider.handlers.PipelineStatus import kotlinx.coroutines.CoroutineScope @@ -40,7 +39,7 @@ abstract class ChainBuilder( fun buildChain(): StreamMerger { val streamNames = request.stream.map { stream -> CommonStreamName(request.bookId, stream) } - pipelineStatus.addStreams(streamNames.map { it.toString() }) + pipelineStatus.addStreams(streamNames.map(CommonStreamName::toString)) val dataStreams = streamNames.map { streamName -> diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchConverter.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchConverter.kt index c16dbff2..5994f6b8 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchConverter.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchConverter.kt @@ -106,7 +106,7 @@ abstract class MessageBatchConverter( val timeStart = System.currentTimeMillis() - logger.trace { "received raw batch (stream=${commonStreamName.toString()} first-time=${pipelineMessage.storedBatchWrapper.batchFirstTime})" } + logger.trace { "received raw batch (stream=$commonStreamName first-time=${pipelineMessage.storedBatchWrapper.batchFirstTime})" } val filteredMessages: List> = pipelineMessage.storedBatchWrapper.trimmedMessages.convertAndFilter() @@ -130,9 +130,9 @@ abstract class MessageBatchConverter( if (codecRequest.codecRequest.groupsCount > 0) { sendToChannel(codecRequest) - logger.trace { "converted batch is sent downstream (stream=${commonStreamName.toString()} first-time=${codecRequest.storedBatchWrapper.batchFirstTime} requestHash=${codecRequest.codecRequest.requestHash})" } + logger.trace { "converted batch is sent downstream (stream=$commonStreamName first-time=${codecRequest.storedBatchWrapper.batchFirstTime} requestHash=${codecRequest.codecRequest.requestHash})" } } else { - logger.trace { "converted batch is discarded because it has no messages (stream=${commonStreamName.toString()} first-time=${pipelineMessage.storedBatchWrapper.batchFirstTime})" } + logger.trace { "converted batch is discarded because it has no messages (stream=$commonStreamName first-time=${pipelineMessage.storedBatchWrapper.batchFirstTime})" } } pipelineStatus.convertSendDownstream( @@ -188,7 +188,7 @@ class ProtoMessageBatchConverter( ((included.isNullOrEmpty() || included.contains(protocol)) && (excluded.isNullOrEmpty() || !excluded.contains(protocol))) .also { - logger.trace { "message ${message?.sequence} has protocol $protocol (matchesProtocolFilter=${it}) (stream=${commonStreamName.toString()})" } + logger.trace { "message ${message?.sequence} has protocol $protocol (matchesProtocolFilter=${it}) (stream=$commonStreamName)" } } }.toList() diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchDecoder.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchDecoder.kt index 6e4ca4b5..c01ba728 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchDecoder.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchDecoder.kt @@ -95,7 +95,7 @@ class MessageBatchDecoder( ) ) } else { - logger.trace { "received converted batch (stream=${commonStreamName.toString()} first-time=${pipelineMessage.storedBatchWrapper.batchFirstTime} requestHash=${pipelineMessage.codecRequest.requestHash})" } + logger.trace { "received converted batch (stream=$commonStreamName first-time=${pipelineMessage.storedBatchWrapper.batchFirstTime} requestHash=${pipelineMessage.codecRequest.requestHash})" } pipelineStatus.decodeStart( commonStreamName.toString(), @@ -120,7 +120,7 @@ class MessageBatchDecoder( pipelineMessage.codecRequest.groupsCount.toLong() ) - logger.trace { "decoded batch is sent downstream (stream=${commonStreamName.toString()} first-time=${result.storedBatchWrapper.batchFirstTime} requestHash=${pipelineMessage.codecRequest.requestHash})" } + logger.trace { "decoded batch is sent downstream (stream=$commonStreamName first-time=${result.storedBatchWrapper.batchFirstTime} requestHash=${pipelineMessage.codecRequest.requestHash})" } } pipelineStatus.countParseRequested( diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchUnpacker.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchUnpacker.kt index 439aa825..c4c1897f 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchUnpacker.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageBatchUnpacker.kt @@ -148,7 +148,7 @@ abstract class MessageBatchUnpacker( val messages = pipelineMessage.storedBatchWrapper.trimmedMessages - logger.debug { "codec response unpacking took ${result.duration.toDouble(DurationUnit.MILLISECONDS)}ms (stream=${commonStreamName.toString()} firstId=${messages.first().id.sequence} lastId=${messages.last().id.sequence} messages=${messages.size})" } + logger.debug { "codec response unpacking took ${result.duration.toDouble(DurationUnit.MILLISECONDS)}ms (stream=$commonStreamName firstId=${messages.first().id.sequence} lastId=${messages.last().id.sequence} messages=${messages.size})" } pipelineMessage.info.buildMessage = result.duration.toDouble(DurationUnit.MILLISECONDS).toLong() StreamWriter.setBuildMessage(pipelineMessage.info) @@ -165,7 +165,7 @@ abstract class MessageBatchUnpacker( pipelineMessage.storedBatchWrapper.trimmedMessages.size.toLong() ) - logger.debug { "unpacked responses are sent (stream=${commonStreamName.toString()} firstId=${messages.first().id.sequence} lastId=${messages.last().id.sequence} messages=${result.value.size})" } + logger.debug { "unpacked responses are sent (stream=$commonStreamName firstId=${messages.first().id.sequence} lastId=${messages.last().id.sequence} messages=${result.value.size})" } } else { sendToChannel(pipelineMessage) @@ -232,7 +232,7 @@ class ProtoMessageBatchUnpacker( val messages = pipelineMessage.storedBatchWrapper.trimmedMessages throw CodecResponseException( - """codec dont parsed all messages + """codec don't parsed all messages | (stream=${commonStreamName} | firstRequestId=${messages.first().id.sequence} | lastRequestId=${messages.last().id.sequence} @@ -320,7 +320,7 @@ class TransportMessageBatchUnpacker( val messages = pipelineMessage.storedBatchWrapper.trimmedMessages throw CodecResponseException( - """codec dont parsed all messages + """codec don't parsed all messages | (stream=${commonStreamName} | firstRequestId=${messages.first().id.sequence} | lastRequestId=${messages.last().id.sequence} diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageFilter.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageFilter.kt index 94364c7e..375ccfca 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageFilter.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/MessageFilter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Exactpro (Exactpro Systems Limited) + * Copyright 2021-2024 Exactpro (Exactpro Systems Limited) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/helpers/StreamHolder.kt b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/helpers/StreamHolder.kt index 075fa759..2b703f8f 100644 --- a/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/helpers/StreamHolder.kt +++ b/src/main/kotlin/com/exactpro/th2/rptdataprovider/handlers/messages/helpers/StreamHolder.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 Exactpro (Exactpro Systems Limited) + * Copyright 2022-2024 Exactpro (Exactpro Systems Limited) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.