On Sat, 20 Sep 2025 21:23:06 GMT, Sergey Bylokhov <[email protected]> wrote:

>>> I don't think it is high profile enough to need a release note.
>> 
>> OK, sounds good.
>> 
>>> I was hoping I could push that problem listing (it is an internal thing) 
>>> right at the same time you pushed
>> 
>> Ah, I'm sorry -- I didn't realize you meant that level of coordination!
>
> Hi @gredler, can you please take a look to 
> [this](https://github.com/openjdk/jdk/blob/cc65836d00de7041e7d32e7f15d98108b1ae47a0/src/java.desktop/share/classes/sun/java2d/pipe/OutlineTextRenderer.java#L76)
>  code in OutlineTextRenderer:
> 
>         if ("".equals(str)) {
>             return; // TextLayout constructor throws IAE on "".
>         }
>         TextLayout tl = new TextLayout(str, g2d.getFont(),
>                                        g2d.getFontRenderContext());
> 
> Do we still need it after this patch?

> @mrserb Probably not needed, but there are quite a few of these guard 
> conditions, and I'm not sure whether it's best to leave them in as 
> optimizations, or if it's best to simplify the code by removing them. Here's 
> a list, let me know what you think. Maybe we leave it in but remove the IAE 
> comment?

These are all useful optimizations. I would leave them. Just remove the IAE 
comment as you suggest.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26947#issuecomment-3330073706

Reply via email to