Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ts-1083] raw-parsed-toggle #3

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import com.exactpro.th2.dataprovider.grpc.MessageSearchRequest.ResponseFormat.AL
import com.exactpro.th2.dataprovider.grpc.MessageSearchRequest.ResponseFormat.BASE_64
import com.exactpro.th2.dataprovider.grpc.MessageSearchRequest.ResponseFormat.PARSED
import com.google.protobuf.Timestamp
import mu.KotlinLogging
import java.lang.IllegalArgumentException
import java.time.Instant

private val logger = KotlinLogging.logger { }

fun List<com.exactpro.th2.dataprovider.grpc.MessageSearchRequest.ResponseFormat>?.toLocalResponseFormats() : List<ResponseFormat> {
val list : MutableList<ResponseFormat> = ArrayList()
if (this.isNullOrEmpty()) {
Expand All @@ -44,7 +42,7 @@ fun List<com.exactpro.th2.dataprovider.grpc.MessageSearchRequest.ResponseFormat>
BASE_64 -> list.add(ResponseFormat.BASE_64)
PARSED -> list.add(ResponseFormat.PARSED)
else -> {
logger.error { "Unrecognized response format: $responseFormat" }
throw IllegalArgumentException("Unrecognized response format")
Dmitriy-Yugay marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down