Open vahid-forghani opened 2 years ago
using functional programming is highly recommended.
return entityList.stream().map(this::toDto).collect(Collectors.toList());
then you can remove all of these lines :
List<ArticleDTO> list = new ArrayList<>(entityList.size()); for (Article entity : entityList) { list.add(toDto(entity)); } return list;
Thank you! Fixed.
https://github.com/amezenin/encyclopedia-kn/blob/d53e5f3c72c28001a877e8c4e140c8eff7fe7b01/src/main/java/com/knits/product/service/mapper/ArticleMapper.java#L90
using functional programming is highly recommended.
return entityList.stream().map(this::toDto).collect(Collectors.toList());
then you can remove all of these lines :