RFR: 8332895: Support interpolation for backgrounds and borders [v2]
John Hendrikx
jhendrikx at openjdk.org
Sat Aug 3 14:23:38 UTC 2024
On Fri, 2 Aug 2024 01:32:09 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/layout/Border.java line 331:
>>
>>> 329:
>>> 330: for (int i = 0, max = strokes.size(); i < max; i++) {
>>> 331: final BorderStroke stroke = strokes.get(i);
>>
>> just curious: do we really need `final` keyword for local variables after java8?
>
> I don't use it, but I didn't change the existing code here.
> just curious: do we really need `final` keyword for local variables after java8?
It's superfluous, and only useful if you are not initializing it immediately and you still want to force a single assignment. If you always immediately initialize locals (either using a method call or through a ternary (`?:`)) then the `final` keyword is definitely just noise.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1702788647
More information about the openjfx-dev
mailing list