From 4d2d7fa1133834c574ab616ebbb5d55b2bc49d60 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 26 Apr 2019 09:47:41 +0400 Subject: [PATCH] fix lambda --- src/main/java/ru/ulstu/conference/model/ConferenceDto.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/ulstu/conference/model/ConferenceDto.java b/src/main/java/ru/ulstu/conference/model/ConferenceDto.java index 5eca110..6264f62 100644 --- a/src/main/java/ru/ulstu/conference/model/ConferenceDto.java +++ b/src/main/java/ru/ulstu/conference/model/ConferenceDto.java @@ -3,6 +3,7 @@ package ru.ulstu.conference.model; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import org.springframework.format.annotation.DateTimeFormat; +import ru.ulstu.core.model.BaseEntity; import ru.ulstu.deadline.model.Deadline; import ru.ulstu.paper.model.Paper; @@ -88,8 +89,8 @@ public class ConferenceDto { this.beginDate = conference.getBeginDate(); this.endDate = conference.getEndDate(); this.deadlines = conference.getDeadlines(); - this.userIds = convert(conference.getUsers(), user -> user.getId()); - this.paperIds = convert(conference.getPapers(), paper -> paper.getId()); + this.userIds = convert(conference.getUsers(), BaseEntity::getId); + this.paperIds = convert(conference.getPapers(), BaseEntity::getId); this.users = conference.getUsers(); this.papers = conference.getPapers(); }