Skip to content

Conversation

@ccleva
Copy link
Contributor

@ccleva ccleva commented Jan 3, 2025

Thanks for contributing.

Description

Testing

Yes

ccleva added 2 commits January 3, 2025 10:02
* Avoid multiple calls to toLowerCase
* Make local variables finals
*/
private void renameDuplicateColumnHeaders(String[] headerNames) {
Map<String, Integer> nameCounter = new HashMap<>();
final Map<String, Integer> nameCounter = new HashMap<>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove final everywhere. It doesn't match the style of the codebase

Maybe we can consider whether to migrate to var after a release has been out for awhile if folks don't complain about us dropping Java 8. Perhaps final var would look less noisy than final looks with types. The other option might be lombok's val, but not sure if I'd want to introduce something that non-standard

void allowDuplicateColumnNamesInsensitive() throws IOException {
final Reader reader2 =
new StringReader(
"Col1" + COMMA + "col1" + LINE_END + "\"first\"" + COMMA + "second" + LINE_END);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could probably make this a tad simpler

Suggested change
"Col1" + COMMA + "col1" + LINE_END + "\"first\"" + COMMA + "second" + LINE_END);
"Col1" + COMMA + "col1" + LINE_END + "first" + COMMA + "second" + LINE_END);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I took that from the test above. Done

@benmccann benmccann merged commit 3c443ed into jtablesaw:master Jan 3, 2025
7 checks passed
@ccleva ccleva deleted the add_test_for_#1197 branch January 3, 2025 17:58
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