When the client shuts down the command window, the application throws a NullPointerException and fails to create the save folder.
To Reproduce
Run the application with Redis as the key-value database.
Shut down the command window while the application is running.
Observe the error message and the exit code.
Expected behavior
The application should handle the command window shutdown gracefully and create the save folder successfully.
Possible solution
Check if the firstReading variable is null before invoking the startsWith method on it.
When the client shuts down the command window, the application throws a NullPointerException and fails to create the save folder.
To Reproduce Run the application with Redis as the key-value database. Shut down the command window while the application is running. Observe the error message and the exit code.
Expected behavior The application should handle the command window shutdown gracefully and create the save folder successfully.
Possible solution Check if the firstReading variable is null before invoking the startsWith method on it.