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

removes bare usage of Text.getBytes() #4895

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

Conversation

keith-turner
Copy link
Contributor

Calls to Text.getBytes() should always be accompanied with a call to getLength() because an array that is longer than the data could be returned if set() was ever called on the Text object.

Replaced with a call to getRowData().toArray() that is more efficient and does not have the length problem.

Did a partial review of the code and found this one case. Could be other cases like this lurking.

Calls to Text.getBytes() should always be accompanied with a call to
getLength() because an array that is longer than the data could be
returned if set() was ever called on the Text object.

Replaced with a call to getRowData().toArray() that is more efficient
and does not have the length problem.

Did a partial review of the code and found this one case.  Could be
other cases like this lurking.
@keith-turner keith-turner added this to the 3.1.0 milestone Sep 17, 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.

1 participant