CSV import improvements

csv
Laurent 6 years ago
parent 143856a24e
commit 30867642e5
  1. 2
      app/src/main/java/net/pokeranalytics/android/util/csv/CSVField.kt
  2. 2
      app/src/main/java/net/pokeranalytics/android/util/csv/CSVImporter.kt

@ -25,7 +25,7 @@ interface NumberCSVField: TypedCSVField<Double> {
return try { return try {
formatter.parse(value).toDouble() formatter.parse(value).toDouble()
} catch (e: ParseException) { } catch (e: ParseException) {
Timber.d("Unparseable number: $value") Timber.d("Field ${header} > Unparseable number: $value")
null null
} }
} }

@ -107,7 +107,7 @@ open class CSVImporter(istream: InputStream) {
parser.forEachIndexed { index, record -> parser.forEachIndexed { index, record ->
Timber.d("line $index") // Timber.d("line $index")
this.notifyDelegate() this.notifyDelegate()
if (this.currentDescriptor == null) { // find descriptor if (this.currentDescriptor == null) { // find descriptor

Loading…
Cancel
Save