You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This surfaced as an FP of UnusedPrivateMethod. It is caused by the fact that collect is inferred to Map<Object, List<Item>> and not Map<(*unknown*), List<Item>>.
One of the examples where buildItem(a, b) method is considered as unused:
List<SummaryDto.ItemDto> items = new ArrayList<>();
loads.stream()
.collect(Collectors.groupingBy(Item::getValue))
.forEach((a, b) -> items.add(buildItem(a, b)));
private SummaryDto.ItemDto buildItem(BigDecimal a, List<Item> b) {
return SummaryDto.ItemDto.builder()....build();
}
In the case of creating the same method without params - there is no issue
List<SummaryDto.ItemDto> items = new ArrayList<>();
loads.stream()
.collect(Collectors.groupingBy(Item::getValue))
.forEach((a, b) -> items.add(buildItem()));
private SummaryDto.ItemDto buildItem() {
return SummaryDto.ItemDto.builder()....build();
}
This surfaced as an FP of UnusedPrivateMethod. It is caused by the fact that
collect
is inferred toMap<Object, List<Item>>
and notMap<(*unknown*), List<Item>>
.One of the examples where buildItem(a, b) method is considered as unused:
In the case of creating the same method without params - there is no issue
Originally posted by @VitaliiIevtushenko in #5184 (comment)
The text was updated successfully, but these errors were encountered: