Closed CharlesClark84 closed 5 years ago
@CharlesClark84 Which code quality tool from week 14 did you use to analyze the code? What items did the code quality tool highlight?
indieproject
Maintainability
Avoid Duplicate Literals
SignUpUser
The String literal "errorMessage" appears 6 times in this file; the first occurrence is on line 60
The String literal "signUp.jsp" appears 6 times in this file; the first occurrence is on line 61
Unused local variable
Reliability
Malicious code vulnerability - May expose internal representation by incorporating reference to mutable object
User
EI2: new com.kevinheise.entity.User(String, String, String, String, String, Date, String, String) may expose internal representation by storing an externally mutable object into User.birthDate
EI2: com.kevinheise.entity.User.setBirthDate(Date) may expose internal representation by storing an externally mutable object into User.birthDate
Malicious code vulnerability - May expose internal representation by returning reference to mutable object
Usability
Dodgy - Dead store to local variable
GenericDao
DLS: Dead store to root in com.kevinheise.persistence.GenericDao.getAll()
UserDao
DLS: Dead store to root in com.kevinheise.persistence.UserDao.getAll()
If Stmts Must Use Braces
Role
Avoid using if statements without curly braces
Avoid using if statements without curly braces
Maintainability- You could create a properties file for these values
Reliability- reduce risk point by making objects only changeable within class
Usability- Create a reference variable that holds this value and call it in your code
Usability- Add curly braces to if statements
@kheise91 Looks like some good suggestions here, be sure to address some of those code quality findings :)
Design/Code Review 3
Project: Music show finder and ride share
Developer: Kevin Heise
Reviewer: Charles Clark