Skip to content

Commit

Permalink
Merge pull request #11 from spdx/updateopencsv
Browse files Browse the repository at this point in the history
Update OpenCSV to later version
  • Loading branch information
goneall authored Nov 12, 2021
2 parents d6162ba + 05e9f5c commit db6caf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.1</version>
<version>5.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/spdx/spreadsheetstore/AbstractSheet.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import com.opencsv.CSVReader;
import com.opencsv.CSVReaderBuilder;
import com.opencsv.CSVWriter;
import com.opencsv.exceptions.CsvValidationException;

/**
* Abstract class representing a workbook sheet used in storing structured data
Expand Down Expand Up @@ -444,7 +445,9 @@ public static List<String> csvToStrings(String csv) {
try {
return Arrays.asList(csvReader.readNext());
} catch (IOException e) {
return Arrays.asList(new String[] {"ERROR PARSING CSV String"});
return Arrays.asList(new String[] {"I/O ERROR PARSING CSV String"});
} catch (CsvValidationException e) {
return Arrays.asList(new String[] {"CSV VALIDATION ERROR PARSING CSV String"});
} finally {
try {
csvReader.close();
Expand Down

0 comments on commit db6caf0

Please sign in to comment.