Bug description: Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Explanation: Catching generic exceptions is not an elegant way to handle intended exceptions. Therefore, it is hard to determine what exception is caught and how to recover in customized behaviors[1].
Bug location: ASE/Hotel/src/main/java/database/DatabaseHandler.java (line 27)
Type: strict exception
Code snippet:
Bug description: Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Explanation: Catching generic exceptions is not an elegant way to handle intended exceptions. Therefore, it is hard to determine what exception is caught and how to recover in customized behaviors[1].
Reference: [1] https://dzone.com/articles/java-top-5-exception-handling