RFR: 8299684: (bf) JNI direct buffer functions with large capacity behave unexpectedly
Paul Sandoz
psandoz at openjdk.org
Thu Jan 5 23:31:50 UTC 2023
On Thu, 5 Jan 2023 23:22:34 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 249:
>>
>>> 247: return Math.toIntExact(capacity);
>>> 248: } catch (ArithmeticException ignore) {
>>> 249: throw new IllegalArgumentException("capacity " + capacity
>>
>> I think we should mention the source, that the capacity value originates from a native call to NewDirectByteBuffer, since that will not appear in any frames of the reported stack trace.
>
>> I think we should mention the source, that the capacity value originates from a native call to NewDirectByteBuffer [...]
>
> So you mean in the IAE message itself?
Yes, enhance the message with more detail
-------------
PR: https://git.openjdk.org/jdk/pull/11873
More information about the nio-dev
mailing list