[ping] Re: 8048192: (bf) Out of direct buffer memory message should include the limits

Roger Riggs Roger.Riggs at oracle.com
Thu Feb 21 17:05:51 UTC 2019


Hi Brian,

That's fine, the string concat should be ok.

its a bit wordy, but fine.

+1, Roger


On 02/21/2019 12:01 PM, Brian Burkhalter wrote:
> Ping
>
> If we don’t want to improve the error message I suggest resolving this 
> as “Won’t Fix."
>
>> On Feb 14, 2019, at 8:25 AM, Brian Burkhalter 
>> <brian.burkhalter at oracle.com <mailto:brian.burkhalter at oracle.com>> wrote:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8048192
>>
>> One possible solution is given below but I am not sure whether 
>> composing such an error string is desirable during bootstrap / 
>> startup. If this is undesirable then perhaps the issue should be 
>> resolved as WNF?
>>
>> Thanks,
>>
>> Brian
>>
>> --- a/src/java.base/share/classes/java/nio/Bits.java
>> +++ b/src/java.base/share/classes/java/nio/Bits.java
>> @@ -172,7 +172,11 @@
>>              }
>>
>>              // no luck
>> -            throw new OutOfMemoryError("Direct buffer memory");
>> +            throw new OutOfMemoryError
>> +                ("Direct buffer memory: MAX_MEMORY = " + MAX_MEMORY
>> +                + ", RESERVED_MEMORY = " + RESERVED_MEMORY.get()
>> +                + ", TOTAL_CAPACITY = " + TOTAL_CAPACITY.get()
>> +                + ", size = " + size + ", cap = " + cap);
>>
>>          } finally {
>



More information about the nio-dev mailing list