Fix compiler's 'unused' warnings
authorVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Tue, 19 Dec 2017 09:54:24 +0000 (12:54 +0300)
committerVitaliy.Bibaev <vitaliy.bibaev@jetbrains.com>
Tue, 19 Dec 2017 09:54:24 +0000 (12:54 +0300)
plugins/stats-collector/log-events/src/main/kotlin/com/intellij/stats/completion/LogEventSerializer.kt
plugins/stats-collector/log-events/src/main/kotlin/com/intellij/stats/completion/events/TypeEvents.kt
plugins/stats-collector/log-events/src/main/kotlin/com/intellij/stats/validation/InputSessionValidator.kt
plugins/stats-collector/log-events/src/test/kotlin/com/intellij/stats/completion/LogEventFixtures.kt
plugins/stats-collector/src/com/intellij/stats/experiment/WebServiceStatusProvider.kt

index f260d3a2121b8049c189e224d614581ceaba1ffb..5f74d76174e6a83c90683eaa1434221a41c4783c 100644 (file)
@@ -139,9 +139,4 @@ class DeserializedLogEvent(
         val event: LogEvent?,
         val unknownEventFields: Set<String>,
         val absentEventFields: Set<String>
-) {
-
-    val isFailed: Boolean
-      get() = event == null || unknownEventFields.isNotEmpty() || absentEventFields.isNotEmpty()
-
-}
\ No newline at end of file
+)
\ No newline at end of file
index fca628b141e47c03f987a913550599d0cb77e627..de2c8ca20c16f55e5378c78fcac5fca3ca97d8f0 100644 (file)
@@ -44,6 +44,4 @@ class TypeEvent(
     override fun accept(visitor: LogEventVisitor) {
         visitor.visit(this)
     }
-
-    fun newCompletionIds(): List<Int> = newCompletionListItems.map { it.id }
 }
index ba01858a37125ac23f2332c54ea79ed0255c426a..ccbd74a89aac0a6c53d668e2f3ea67ee417d80c7 100644 (file)
@@ -71,7 +71,8 @@ class InputSessionValidator(private val sessionValidationResult: SessionValidati
         dumpSession(session, isValidSession, errorMessage)
     }
 
-    private fun dumpSession(session: List<EventLine>, isValidSession: Boolean, errorMessage: String) {
+    private fun dumpSession(session: List<EventLine>, isValidSession: Boolean,
+                            @Suppress("UNUSED_PARAMETER") errorMessage: String) {
         if (isValidSession) {
             sessionValidationResult.addValidSession(session)
         }
index bdc56a1dedc1965624e3af35dd1206662548329b..f0ae1c63ad0533edd7e0517bba7220ad329dd28a 100644 (file)
@@ -18,6 +18,7 @@ package com.intellij.stats.completion
 
 import com.intellij.stats.completion.events.*
 
+@Suppress("unused")
 object LogEventFixtures {
     
     val sessionId = "session-id-xxx"
index ff17c33f4288682538880fd009daa202775c1561..d04aeff83c6d4952df8be43c5632f469f65e9b22 100644 (file)
@@ -101,6 +101,4 @@ class WebServiceStatusProvider(
 
 }
 
-data class ExperimentInfo(var experimentVersion: Int, var salt: String, var performExperiment: Boolean) {
-    constructor() : this(0, "", false)
-}
\ No newline at end of file
+data class ExperimentInfo(var experimentVersion: Int, var salt: String, var performExperiment: Boolean)
\ No newline at end of file