On Fri, 2 Aug 2024 01:32:09 GMT, Michael Strauß <mstra...@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

Reply via email to