[OpenJDK 2D-Dev] RFR: JDK-8263362: Avoid division by 0 in java/awt/font/TextJustifier.java justify [v2]
Matthias Baesken
mbaesken at openjdk.java.net
Wed May 5 14:11:16 UTC 2021
On Wed, 5 May 2021 12:56:54 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> should we then better check for
>> if (weight > 0)
>> instead of
>> if (weight != 0)
>> like it is done for absorbweight ?
>> (If you think consistency is important here)
>
> I guess since it was mentioned before that nothing prevents the value from being -ve,
> I guess better will be to use != 0 check for absorbweight too?
okay, I adjusted the check for absorbweight .
-------------
PR: https://git.openjdk.java.net/jdk/pull/2912
More information about the 2d-dev
mailing list