Skip to content

Commit 66752e8

Browse files
committed
refactor(SeriesServiceImpl.add): modify assertion error messages.
No functional changes.
1 parent 1c9418f commit 66752e8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/ru/mystamps/web/feature/series/SeriesServiceImpl.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,11 @@ public class SeriesServiceImpl implements SeriesService {
6060
@PreAuthorize(HasAuthority.CREATE_SERIES)
6161
public Integer add(AddSeriesDto dto, Integer userId, boolean userCanAddComments) {
6262
Validate.isTrue(dto != null, "DTO must be non null");
63-
Validate.isTrue(dto.getQuantity() != null, "Stamps quantity must be non null");
64-
Validate.isTrue(
65-
dto.getPerforated() != null,
66-
"Stamps perforated property must be non null"
67-
);
63+
Validate.isTrue(dto.getQuantity() != null, "Quantity must be non null");
64+
Validate.isTrue(dto.getPerforated() != null, "Perforated property must be non null");
6865
Validate.isTrue(dto.getCategory() != null, "Category must be non null");
6966
Validate.isTrue(dto.getCategory().getId() != null, "Category id must be non null");
70-
Validate.isTrue(userId != null, "Current user id must be non null");
67+
Validate.isTrue(userId != null, "User id must be non null");
7168

7269
AddSeriesDbDto series = new AddSeriesDbDto();
7370

0 commit comments

Comments
 (0)