diff options
author | Filip Krzywka <filip.krzywka@nokia.com> | 2018-11-27 13:04:48 +0100 |
---|---|---|
committer | Filip Krzywka <filip.krzywka@nokia.com> | 2018-11-28 08:07:22 +0100 |
commit | 77f896523f2065b1da1be21545155a29edea5122 (patch) | |
tree | 4c310e94f4836d2324f1689ca44f226f158b7886 /hv-collector-dcae-app-simulator/src | |
parent | 4f683d3e17025131a297baa67300da679bb85141 (diff) |
Bump checkstyle version
- changed plugin invocation due to backwards incompatible
changes made in detekt's RC9 version
- disabled few rules that we actually don't follow in our code and
we seem to be fine with it
- turned on UnusedPrivateMember as it actually is a code smell/debt
- supressed warnings in where it was plausible (according to common sense)
- fixed warnings wherever possible
Change-Id: I7be97f471ff46786ef1fca3432b759e7820ac681
Issue-ID: DCAEGEN2-996
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'hv-collector-dcae-app-simulator/src')
3 files changed, 4 insertions, 5 deletions
diff --git a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt index c80b0480..e423191d 100644 --- a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt +++ b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt @@ -67,14 +67,13 @@ class MessageStreamValidation( private fun shouldValidatePayloads(parameters: List<MessageParameters>) = parameters.all { it.messageType == MessageType.FIXED_PAYLOAD } - - private fun validateHeaders(actual: List<VesEventOuterClass.VesEvent>, expected: List<VesEventOuterClass.VesEvent>): Boolean { + private fun validateHeaders(actual: List<VesEventOuterClass.VesEvent>, + expected: List<VesEventOuterClass.VesEvent>): Boolean { val consumedHeaders = actual.map { it.commonEventHeader } val generatedHeaders = expected.map { it.commonEventHeader } return generatedHeaders == consumedHeaders } - private fun generateEvents(parameters: List<MessageParameters>): IO<List<VesEventOuterClass.VesEvent>> = messageGenerator.createMessageFlux(parameters) .map(WireFrameMessage::payload) diff --git a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt index 15965174..10dedbdf 100644 --- a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt +++ b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt @@ -47,7 +47,8 @@ class KafkaSource(private val receiver: KafkaReceiver<ByteArray, ByteArray>) { return KafkaSource(KafkaReceiver.create(createReceiverOptions(bootstrapServers, topics))) } - fun createReceiverOptions(bootstrapServers: String, topics: Set<String>): ReceiverOptions<ByteArray, ByteArray>? { + fun createReceiverOptions(bootstrapServers: String, + topics: Set<String>): ReceiverOptions<ByteArray, ByteArray>? { val props = mapOf<String, Any>( ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG to bootstrapServers, ConsumerConfig.CLIENT_ID_CONFIG to "hv-collector-dcae-app-simulator", diff --git a/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/ConsumerTest.kt b/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/ConsumerTest.kt index debe9554..08558d76 100644 --- a/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/ConsumerTest.kt +++ b/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/ConsumerTest.kt @@ -24,7 +24,6 @@ import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on import reactor.kafka.receiver.ReceiverRecord |