Skip to content

HHH-19464 storing a binary data into blob on oracle cutting off its content #10160

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

Conversation

cigaly
Copy link
Contributor

@cigaly cigaly commented May 15, 2025

Jira issue HHH-19464

In org.hibernate.type.descriptor.java.DataHelper#extractBytes(java.io.InputStream, long, int) assumption that java.io.InputStream#read(byte[]) reached EOF when number of bytes read is less than size of buffer is not correct.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@cigaly cigaly changed the title Hhh 19464 storing a binary data into blob on oracle cutting off its content HHH-19464 storing a binary data into blob on oracle cutting off its content May 15, 2025
@cigaly cigaly force-pushed the HHH-19464-Storing_a_binary_data_into_BLOB_on_Oracle_cutting_off_its_content branch from a69a8b7 to baad677 Compare May 20, 2025 07:12
@cigaly cigaly force-pushed the HHH-19464-Storing_a_binary_data_into_BLOB_on_Oracle_cutting_off_its_content branch from baad677 to 0add274 Compare May 20, 2025 07:18

private static byte[] getRandomBytes() {
final var bytes = new byte[RANDOM_SIZE];
new Random().nextBytes( bytes );

Check warning

Code scanning / CodeQL

Random used only once Warning test

Random object created and used only once.
@beikov beikov merged commit e745380 into hibernate:main Jun 30, 2025
22 of 25 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.

3 participants