Hi,

Please see the sample code below.

SerialBlob sb1 = new SerialBlob(new byte[]{1, 2, 3});
SerialBlob sb2 = new SerialBlob(new byte[]{1, 2, 3, 4, 5});
sb2.truncate(3);
System.out.println(sb1.equals(sb2));
System.out.println(sb1.hashCode() == sb2.hashCode());

I think that it should output "true" & "true" but the current implementation outputs "true" & "false".

I know the use of SerialBlob.hashCode() is uncommon, but I think it is better to be fixed.
If it's worth changing, could anyone submit this issue to JBS for me?
I'm ready to submit a pull request, but I don't have an Author role.

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

Thanks

Reply via email to