RFR: JDK-8015739: Background of JInternalFrame is located out of JInternalFrame [v4]
Stanimir Stamenkov
duke at openjdk.org
Tue Oct 4 18:28:53 UTC 2022
On Tue, 4 Oct 2022 18:23:17 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java line 255:
>>
>>> 253: * @return a {@code int} which is the rounded value of provided number
>>> 254: */
>>> 255: private static int roundDown(double d)
>>
>> The name of this method is a bit misleading, the operation doesn't actually round down, but rounds the number normally except for the x.5 case right? Does this operation exist somewhere else?
>
> Yes, that is correct. The method doc does clarify the purpose. But I see your point - probably `roundOff()` would sound less ambiguous and neutral?
[`roundHalfDown`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/RoundingMode.html#HALF_DOWN)?
-------------
PR: https://git.openjdk.org/jdk/pull/10274
More information about the client-libs-dev
mailing list