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

feat: add case transform #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jjaakola-aiven
Copy link
Contributor

No description provided.

@jjaakola-aiven jjaakola-aiven requested a review from a team as a code owner February 20, 2025 10:33
@jjaakola-aiven jjaakola-aiven force-pushed the jjaakola-aiven-add-case-transform branch from 2c14ff1 to 4df98da Compare February 25, 2025 07:30
Copy link

@Claudenw Claudenw left a comment

Choose a reason for hiding this comment

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

The upper/lower case conversion is an issue the rest are suggestions or questions.

return caseValue;
}
}
return null;

Choose a reason for hiding this comment

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

Should this return a null or should it throw

  1. a NPE on null argument and
  2. an IllegalArgumentException if the string is not found, like the enum.valueOf() does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, went with IllegalArgumentException.

Comment on lines 124 to 127
caseTransformFunc = String::toLowerCase;
break;
case UPPER:
caseTransformFunc = String::toUpperCase;

Choose a reason for hiding this comment

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

These case changes are local specific. We should use toLowerCase(Locale.ROOT) and toUpperCase(Locale.ROOT).

see javadoc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, added the root locale.

Choose a reason for hiding this comment

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

Can you add some javadoc to this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some.

Choose a reason for hiding this comment

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

Can you add some javadoc to this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some.

@jjaakola-aiven jjaakola-aiven force-pushed the jjaakola-aiven-add-case-transform branch from 4df98da to c3d636c Compare February 25, 2025 10:10
@jjaakola-aiven jjaakola-aiven dismissed Claudenw’s stale review February 25, 2025 10:11

Addressed comments.

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