From 1b9dd15e1d2a36549cd8042fd695e31da4524d75 Mon Sep 17 00:00:00 2001 From: Zhang Ziqing Date: Sat, 15 Jan 2022 23:11:08 +0800 Subject: [PATCH] Fix uninformative timestamp error message --- .../ui/request/FeedbackSessionBasicRequest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/teammates/ui/request/FeedbackSessionBasicRequest.java b/src/main/java/teammates/ui/request/FeedbackSessionBasicRequest.java index b0bd6a2a8543..bb3dd8706f25 100644 --- a/src/main/java/teammates/ui/request/FeedbackSessionBasicRequest.java +++ b/src/main/java/teammates/ui/request/FeedbackSessionBasicRequest.java @@ -127,23 +127,23 @@ public void setPublishedEmailEnabled(boolean publishedEmailEnabled) { @Override public void validate() throws InvalidHttpRequestBodyException { assertTrue(instructions != null, "Instructions cannot be null"); - assertTrue(submissionStartTimestamp > 0L, "Start timestamp should be more than zero"); - assertTrue(submissionEndTimestamp > 0L, "End timestamp should be more than zero"); + assertTrue(submissionStartTimestamp > 0L, "Submission opening date is invalid"); + assertTrue(submissionEndTimestamp > 0L, "Submission closing date is invalid"); assertTrue(sessionVisibleSetting != null, "sessionVisibleSetting cannot be null"); if (sessionVisibleSetting == SessionVisibleSetting.CUSTOM) { assertTrue(customSessionVisibleTimestamp != null, - "session visible timestamp should not be null"); + "Session visible timestamp is invalid"); assertTrue(customSessionVisibleTimestamp > 0L, - "session visible timestamp should be more than zero"); + "Session visible timestamp should be more than zero"); } assertTrue(responseVisibleSetting != null, "responseVisibleSetting cannot be null"); if (responseVisibleSetting == ResponseVisibleSetting.CUSTOM) { assertTrue(customResponseVisibleTimestamp != null, - "response visible timestamp should not be null"); + "Response visible timestamp is invalid"); assertTrue(customResponseVisibleTimestamp > 0L, - "response visible timestamp should be more than zero"); + "Response visible timestamp should be more than zero"); } } }