May I make a pull request for JDK-8153490?

Mitsuru Kariya mitsuru.kariya at oss.nttdata.com
Tue May 11 12:59:45 UTC 2021


Hi,

While reading the SerialBlob source, I found that it's been over a year 
and a half since the JDK-8153490 was last updated.

Furthermore, according to the documentation of Blog.setBytes() (not 
SerialBlob.setBytes()), there are the following problems:

1. It says "If the end of the Blob value is reached while writing the 
array of bytes, then the length of the Blob value will be increased to 
accommodate the extra bytes."
But the current implementation throws SerialException.

2. It says "If the value specified for pos is greater than the length+1 
of the BLOB value then the behavior is undefined."
So I think that it should work correctly when pos == length+1 of the 
BLOB value.

May I make a pull request for these problems?

Also, if I may, SerialClob.setString() has the same problem, may I fix 
it together?

JDK-8153490:Cannot setBytes() if incoming buffer's length is bigger than 
number of elements we want to insert.
https://bugs.openjdk.java.net/browse/JDK-8153490

Please let me know if there is a better place to do so.

Thanks


More information about the core-libs-dev mailing list