RFR: JDK-8297414: Remove easy warnings in javafx.controls [v4]
Nir Lisker
nlisker at openjdk.org
Thu Nov 24 04:59:25 UTC 2022
On Wed, 23 Nov 2022 23:06:45 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/infrastructure/ControlSkinFactory.java line 287:
>>
>>> 285: .map(d -> new Object[] {d, })
>>> 286: .collect(toList());
>>> 287: return result;
>>
>> According to the javadoc on this method, it's a hack for old Junit versions. Maybe it isn't needed anymore even. Leave as is for this PR anyway.
>
> Sorry, that's not clear, remove the cast or revert this? Whatever that comment says, I seriously doubt this cast would have any effect on how old JUnit's would behave unless someone is mocking things they shouldn't be (ie. someone mocked the `data` parameter).
Sorry, remove the cast. The javadoc says
* Nasty hack to keep JUnit pre-4.12 happy.
* Before 4.12, Parameterized can only handle
* a collection of arrays.
I think that the whole method could be removed, but it might not be worth dealing with this, especially not now.
-------------
PR: https://git.openjdk.org/jfx/pull/959
More information about the openjfx-dev
mailing list