Skip to content

Commit

Permalink
MODCAL-63 update overlap error message
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-barannyk committed Jan 10, 2020
1 parent f7708c7 commit 44ab9f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private Criterion assembleCriterionToCheckOverlapExcludeOwnId(Openings openings)

private String getErrorMessage(boolean isExceptional) {
return isExceptional
? "Intervals can not overlap."
? "Intervals cannot overlap."
: "The date range entered overlaps with another calendar for this service point. Please correct the date range or enter the hours as exceptions.";
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/utils/CalendarUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private static Map<DayOfWeek, OpeningDayWeekDay> getOpeningDays(OpeningPeriod en
if (!isOverlap(openingDay.getOpeningDay().getOpeningHour())) {
openingDays.put(DayOfWeek.valueOf(openingDay.getWeekdays().getDay().toString()), openingDay);
} else {
throw new OverlapIntervalException("Intervals can not overlap.");
throw new OverlapIntervalException("Intervals cannot overlap.");
}
}
return openingDays;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/folio/rest/impl/CalendarIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class CalendarIT {
private static final Logger log = LoggerFactory.getLogger(CalendarIT.class);

private static final String ERROR_CODE_INTERVALS_OVERLAP = "intervalsOverlap";
private static final String ERROR_MESSAGE_INTERVALS_CANNOT_OVERLAP = "Intervals can not overlap.";
private static final String ERROR_MESSAGE_INTERVALS_CANNOT_OVERLAP = "Intervals cannot overlap.";
private static final String ERROR_MESSAGE_OPENING_PERIOD_INTERVALS_OVERLAP = "The date range entered overlaps " +
"with another calendar for this service point. Please correct the date range or enter the hours as exceptions.";

Expand Down

0 comments on commit 44ab9f8

Please sign in to comment.