mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 09:37:36 -05:00
Properly format and safely escape to CSV in DecodeEventLogger (#1092)
* Add failing test for toCSV() * Add missing " to timeslot value * Add failing test for quotes and commas in details * Separate comma and quote tests * Escape toCSV cells using utility * Use CSVFormatter instead of escape utils Allows us to control exactly how we want to format a CSV-valid row. * Never have a null cell Instead of using a stream map, opting for an explicit handling so the logger can explode when an unexpected null shows up. Prevents the situation where things are mysteriously blank, forcing developers to handle known null scenarios.
This commit is contained in:
@@ -62,6 +62,7 @@ dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.assertj:assertj-core:3.8.0'
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
||||
testImplementation 'org.mockito:mockito-core:3.+'
|
||||
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
||||
|
||||
@@ -92,6 +93,7 @@ dependencies {
|
||||
implementation 'org.apache.commons:commons-compress:1.20'
|
||||
implementation 'org.apache.commons:commons-lang3:3.8.1'
|
||||
implementation 'org.apache.commons:commons-math3:3.6.1'
|
||||
implementation 'org.apache.commons:commons-csv:1.9.0'
|
||||
implementation 'org.apache.mina:mina-core:2.1.3'
|
||||
implementation 'org.apache.mina:mina-http:2.1.3'
|
||||
implementation 'org.controlsfx:controlsfx:11.1.0'
|
||||
|
||||
Reference in New Issue
Block a user