1 | package org.cardanofoundation.explorer.api.mapper; | |
2 | ||
3 | import java.sql.Timestamp; | |
4 | import java.time.LocalDateTime; | |
5 | ||
6 | import org.mapstruct.Mapper; | |
7 | ||
8 | import org.cardanofoundation.explorer.api.model.response.EpochResponse; | |
9 | import org.cardanofoundation.explorer.common.entity.ledgersync.Epoch; | |
10 | ||
11 | @Mapper(componentModel = "spring") | |
12 | public interface EpochMapper { | |
13 | ||
14 | EpochResponse epochToEpochResponse(Epoch epoch); | |
15 | ||
16 | default LocalDateTime fromTimestamp(Timestamp timestamp) { | |
17 |
2
1. fromTimestamp : negated conditional → NO_COVERAGE 2. fromTimestamp : replaced return value with null for org/cardanofoundation/explorer/api/mapper/EpochMapper::fromTimestamp → NO_COVERAGE |
return timestamp == null ? null : timestamp.toLocalDateTime(); |
18 | } | |
19 | } | |
Mutations | ||
17 |
1.1 2.2 |