diff --git a/acrarium/src/main/kotlin/com/faendir/acra/setup/DeviceSetup.kt b/acrarium/src/main/kotlin/com/faendir/acra/setup/DeviceSetup.kt index 5775d10d..083a9683 100644 --- a/acrarium/src/main/kotlin/com/faendir/acra/setup/DeviceSetup.kt +++ b/acrarium/src/main/kotlin/com/faendir/acra/setup/DeviceSetup.kt @@ -50,14 +50,14 @@ class DeviceSetup(private val deviceRepository: DeviceRepository, private val co isHeaderExtractionEnabled = true setProcessor(processor) }).parse(stream.bufferedReader(Charsets.UTF_16LE)) - processor.beans.filter { it.marketingName != null }.forEach { deviceRepository.store(it.device, it.model, it.marketingName!!) } + processor.beans.filter { it.device != null && it.marketingName != null }.forEach { deviceRepository.store(it.device!!, it.model, it.marketingName!!) } } } @NoArgConstructor class Device( @Parsed(field = ["Device"]) - val device: String, + val device: String?, @Parsed(field = ["Model"]) val model: String, @Parsed(field = ["Marketing Name"]) diff --git a/acrarium/src/main/resources/devices.csv b/acrarium/src/main/resources/devices.csv index e53a6937..a4633b32 100644 Binary files a/acrarium/src/main/resources/devices.csv and b/acrarium/src/main/resources/devices.csv differ diff --git a/acrarium/src/test/kotlin/com/faendir/acra/setup/DeviceSetupTest.kt b/acrarium/src/test/kotlin/com/faendir/acra/setup/DeviceSetupTest.kt index 276d745b..ef23d4d9 100644 --- a/acrarium/src/test/kotlin/com/faendir/acra/setup/DeviceSetupTest.kt +++ b/acrarium/src/test/kotlin/com/faendir/acra/setup/DeviceSetupTest.kt @@ -39,6 +39,6 @@ class DeviceSetupTest( fun `should set up devices`() { deviceSetup.onStartup(ContextRefreshedEvent(applicationContext)) - expectThat(jooq.fetchCount(DEVICE)).isEqualTo(35002) + expectThat(jooq.fetchCount(DEVICE)).isEqualTo(36317) } } \ No newline at end of file