On Tue, 19 Apr 2022 19:45:20 GMT, lawrence.andrews <d...@openjdk.java.net> 
wrote:

>> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 123:
>> 
>>> 121:         instructionsText.setLineWrap(true);
>>> 122: 
>>> 123:         long tTimeout = TimeUnit.MINUTES.toMillis(testTimeOut);
>> 
>> Here you could probably reused `testTimeout`:
>> 
>> testTimeOut = TimeUnit.MINUTES.toMillis(testTimeOut);
>
> testTimeOut is used with in lambda hence it should be final. So I just 
> created a new variable.

I see. Yes, lambdas and anonymous classes require final or effectively final 
variables.

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

PR: https://git.openjdk.java.net/jdk/pull/8004

Reply via email to