Skip to content

Add support in Commons CSV for tracking byte positions during parsing#12

Merged
DarrenJAN merged 4 commits into
marklogic:CSV-196-masterfrom
DarrenJAN:CSV-196-master-develop
Nov 19, 2024
Merged

Add support in Commons CSV for tracking byte positions during parsing#12
DarrenJAN merged 4 commits into
marklogic:CSV-196-masterfrom
DarrenJAN:CSV-196-master-develop

Conversation

@DarrenJAN

Copy link
Copy Markdown
  1. Add augment the builder and add a private constructor to create CVSParser class
  2. Adjust format
  3. Use a try-with-resources block
  4. improve the comments
  5. Use a Charset instead of a string Charset name in ExtendedBufferedReader class

Comment thread pom.xml
Comment thread src/test/java/org/apache/commons/csv/CSVParserTest.java Outdated
Comment thread src/test/java/org/apache/commons/csv/CSVParserTest.java Outdated
Comment thread src/test/java/org/apache/commons/csv/CSVParserTest.java Outdated
// "org/apache/commons/csv/CSV-196/japanese.csv"), format, 0L, 1L, "UTF-8");
CSVParser parser = format.parse(getTestInput(
"org/apache/commons/csv/CSV-196/japanese.csv"), 0L, 1L, "UTF-8");
.setDelimiter(',')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indentation.

.setQuote('\'')
.get();
CSVParser parser = new CSVParser.Builder()
.setFormat(format)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indentation.

Comment thread src/main/java/org/apache/commons/csv/CSVParser.java Outdated
Comment thread src/main/java/org/apache/commons/csv/CSVParser.java Outdated
Comment thread src/main/java/org/apache/commons/csv/CSVParser.java Outdated
Comment thread src/main/java/org/apache/commons/csv/ExtendedBufferedReader.java Outdated
}

/**
/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry just noticed an extra indentation problem

@yunzvanessa yunzvanessa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one extra indentation problem, sorry. The rest looks great!

@DarrenJAN DarrenJAN merged commit 3599f5b into marklogic:CSV-196-master Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants