Skip to content

Nullness checker case study on the Server side of LockdownTraveller.#1

Open
UtR491 wants to merge 1 commit intominimal-mainfrom
annotated-minimal
Open

Nullness checker case study on the Server side of LockdownTraveller.#1
UtR491 wants to merge 1 commit intominimal-mainfrom
annotated-minimal

Conversation

@UtR491
Copy link
Owner

@UtR491 UtR491 commented Dec 11, 2020

The DisplayTrainsRequestHandler.java file had very sloppy exception handling. In DisplayTrains() function, there were several try-catch blocks written just to handle the same checked exception as and when it arose. Some of them only had assignments! This resulted in many warnings too, like variable x might not have been initialized, which resulted in vague initialization on declaration and also many redundant assert x != null statements. The best way to counter it was to put the entire function in on try block. This resulted in a very large diff size for the particular file. To contain this to an extent, the indentation is a little bit off but it should make the review more convenient.

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.

1 participant