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

fixes ArrayIndexOutOfBoundsException when reading CSV file #658 #659

Merged
merged 2 commits into from
Sep 6, 2019

Conversation

lwhite1
Copy link
Collaborator

@lwhite1 lwhite1 commented Sep 5, 2019

trims headers consistently.

Thanks for contributing.

Description

Trim headers consistently

Testing

Did you add a unit test? Yes

@lwhite1 lwhite1 requested a review from benmccann September 5, 2019 12:28
@benmccann
Copy link
Collaborator

@lwhite1 Travis is failing

@@ -62,6 +62,7 @@ private String cleanName(String name) {
String[] headerNames = parser.parseNext();
// work around issue where Univocity returns null if a column has no header.
for (int i = 0; i < headerNames.length; i++) {
headerNames[i] = headerNames[i].trim();
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like this could cause an NPE since the next line checks if headerNames[i] == null

Copy link
Collaborator Author

@lwhite1 lwhite1 Sep 6, 2019

Choose a reason for hiding this comment

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

I'll move the call

@lwhite1 Travis is failing

It's the log-length thing again, which I've "fixed" several times by suppressing various kinds of output. I guess we're limited to somewhere 3000-3500 lines of output now or some such. This time the extra output is from issues related to documentation.

With the sub-projects it seems we will run into this a lot. I'd like to suppress all logging except errors. Is that possible?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I just pushed a fix

@lwhite1 lwhite1 merged commit e7a612a into master Sep 6, 2019
@lwhite1 lwhite1 deleted the fix-#658 branch September 10, 2019 20:38
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