Skip to content

Commit

Permalink
Work around Eclipse compiler error regarding type inference in Stream…
Browse files Browse the repository at this point in the history
… APIs
  • Loading branch information
sbrannen committed Oct 20, 2024
1 parent 14b2799 commit 2ee1fcb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ void classesAreStoredInDiscoveryRequest() {
.build();
// @formatter:on

List<Class<?>> classes = discoveryRequest.getSelectorsByType(ClassSelector.class).stream().map(
ClassSelector::getJavaClass).toList();
@SuppressWarnings("rawtypes")
List<Class> classes = discoveryRequest.getSelectorsByType(ClassSelector.class).stream()//
.map(ClassSelector::getJavaClass).map(Class.class::cast).toList();
assertThat(classes).contains(SampleTestClass.class, LauncherDiscoveryRequestBuilderTests.class);
}

Expand Down

0 comments on commit 2ee1fcb

Please sign in to comment.