Skip to content

Commit

Permalink
TIKA-4326: replace deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
THausherr committed Jan 14, 2025
1 parent 978bdcc commit 3f80a05
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void parseStudy(InputStream stream, XHTMLContentHandler xhtml, Met
}
try (AutoDetectReader reader = new AutoDetectReader(CloseShieldInputStream.wrap(tis),
metadata, tikaConfig.getEncodingDetector());
CSVParser csvParser = new CSVParser(reader, CSVFormat.TDF)) {
CSVParser csvParser = CSVParser.builder().setReader(reader).setFormat(CSVFormat.TDF).get()) {
Iterator<CSVRecord> iterator = csvParser.iterator();

xhtml.startElement("table");
Expand Down Expand Up @@ -131,7 +131,7 @@ public static void parseAssay(InputStream stream, XHTMLContentHandler xhtml, Met
}
try (AutoDetectReader reader = new AutoDetectReader(CloseShieldInputStream.wrap(tis),
metadata, tikaConfig.getEncodingDetector());
CSVParser csvParser = new CSVParser(reader, CSVFormat.TDF)) {
CSVParser csvParser = CSVParser.builder().setReader(reader).setFormat(CSVFormat.TDF).get()) {
xhtml.startElement("table");

Iterator<CSVRecord> iterator = csvParser.iterator();
Expand Down Expand Up @@ -172,7 +172,7 @@ private static void extractMetadata(Reader reader, Metadata metadata, String stu

Map<String, String> map = new HashMap<>();

try (CSVParser csvParser = new CSVParser(reader, CSVFormat.TDF)) {
try (CSVParser csvParser = CSVParser.builder().setReader(reader).setFormat(CSVFormat.TDF).get()) {

for (CSVRecord record : csvParser) {
String field = record.get(0);
Expand Down

0 comments on commit 3f80a05

Please sign in to comment.