Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

DarrenJAN
Copy link

  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

pom.xml Show resolved Hide resolved
src/test/java/org/apache/commons/csv/CSVParserTest.java Outdated Show resolved Hide resolved
src/test/java/org/apache/commons/csv/CSVParserTest.java Outdated Show resolved Hide resolved
src/test/java/org/apache/commons/csv/CSVParserTest.java Outdated Show resolved Hide resolved
// "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(',')

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)

Choose a reason for hiding this comment

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

Please fix the indentation.

src/main/java/org/apache/commons/csv/CSVParser.java Outdated Show resolved Hide resolved
src/main/java/org/apache/commons/csv/CSVParser.java Outdated Show resolved Hide resolved
src/main/java/org/apache/commons/csv/CSVParser.java Outdated Show resolved Hide resolved
@@ -510,7 +521,7 @@ public CSVParser(final Reader reader, final CSVFormat format, final long charact
this(reader, format, characterOffset, recordNumber, null);
}

/**
/**

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

Copy link

@yunzvanessa yunzvanessa left a comment

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
5 of 7 checks passed
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