i_1286 Validate user-entered freeze duration in ContestInformationPane - #1288
Open
johnbrvc wants to merge 1 commit into
Open
i_1286 Validate user-entered freeze duration in ContestInformationPane#1288johnbrvc wants to merge 1 commit into
johnbrvc wants to merge 1 commit into
Conversation
Make sure the user entered a valid freeze duration and throw an exception if it's bad. Cleaned up some comments and dunsel code.
johnbrvc
requested review from
JoeTerlizzi,
SamanwaySadhu,
clevengr and
kkarakas
August 10, 2026 02:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of what the PR does
Make sure the user entered a valid freeze duration when an attempt is made to save (update) the settings. Throw an exception if it's bad. In the future, additional fields can easily be validated and throw an exception as well.
Cleaned up some comments and dunsel code.
Issue which the PR addresses
Fixes #1286
Environment in which the PR was developed (OS,IDE, Java version, etc.)
Windows 11
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)
Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)
clics_sumithelloa:30:00and press Update.Previously, this incorrect value was accepted and set.

5. Dismiss the message box.
6. Enter a value such as
25:00and press Update.7. Note the value changes in the text field to "0:25:00" (which is the normalized format).
Note: The freeze length entered will be normalized. That is, a value of 160:00 will be normalized to 2:40:00 since 160 minutes is 2 hours and 40 minutes. In addition, entering a freeze length of 3600 would set the freeze time to 1:00:00. This behavior is by design (existing methods were used to perform this normalization process). Feel free to try it.