Skip to content

Commit

Permalink
chore(formatting): fix detekt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
osoykan committed Nov 29, 2024
1 parent 60e8b52 commit 7a2e721
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,24 @@ interface StoveSerde<TIn : Any, TOut : Any> {
/**
* Deserializes data from the target format into the specified type.
*/
inline fun <reified T : Any> StoveSerde<Any, ByteArray>.deserialize(value: ByteArray): T = deserialize(value, T::class.java)
inline fun <reified T : Any> StoveSerde<Any, ByteArray>.deserialize(
value: ByteArray
): T = deserialize(value, T::class.java)

/**
* Deserializes data from the target format into the specified type.
* Returns a [None] if deserialization fails.
*/
inline fun <reified T : Any> StoveSerde<Any, ByteArray>.deserializeOption(value: ByteArray): Option<T> =
deserializeEither(value, T::class.java).getOrNone()
inline fun <reified T : Any> StoveSerde<Any, ByteArray>.deserializeOption(
value: ByteArray
): Option<T> = deserializeEither(value, T::class.java).getOrNone()

/**
* Deserializes data from the target format into the specified type.
*/
inline fun <reified T : Any> StoveSerde<Any, String>.deserialize(value: String): T = deserialize(value, T::class.java)
inline fun <reified T : Any> StoveSerde<Any, String>.deserialize(
value: String
): T = deserialize(value, T::class.java)

/**
* Deserializes data from the target format into the specified type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import kotlin.time.Duration
* It also provides a way to wait until a message is consumed or produced.
*
* @param serde The serializer/deserializer that will be used to serialize/deserialize the messages.
* It is important to use the same serde that is used in the application. For example, if the application uses Avro, then you should use Avro serde here.
* It is important to use the same serde that is used in the application.
* For example, if the application uses Avro, then you should use Avro serde here.
* Target of the serialization is ByteArray, so the serde should be able to serialize the message to ByteArray.
*/
class TestSystemKafkaInterceptor<K, V>(
Expand Down

0 comments on commit 7a2e721

Please sign in to comment.