Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some bugs #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Soullloud
Copy link

Input Validation:
In the bookRoom method, you should validate user input for room numbers to ensure it's a valid integer.
Add input validation for other user inputs to prevent crashes due to invalid input.

Thread Safety:
When using multi-threading (e.g., writing data to the "backup" file), you should consider thread safety. Accessing shared data without proper synchronization can lead to data corruption. You might want to use synchronization mechanisms like synchronized blocks or methods to ensure thread safety.

Error Handling:
In your main method, when reading the "backup" file, you catch and print exceptions with a generic message ("Not a valid input"). It's essential to handle exceptions more gracefully. For example, you can print a specific error message or log exceptions for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant