508 : sonar qube critical issue fixes (#852)
* 508 : sonar qube critical issue fixes * 508 : Sunar Qube Fixes Define a constant instead of duplicating this literal "user_accounts" 4 times. Define a constant instead of duplicating this literal "userID" 5 times Define a constant instead of duplicating this literal "additionalInfo" 4 times. Define a constant instead of duplicating this literal "userName" 4 times. * 508 : Sunar Qube Fixes Define a constant instead of duplicating this literal "user_accounts" 4 times. * 508 : Sonar Qube Fixes Define a constant instead of duplicating this literal "eEvans" 4 times Define a constant instead of duplicating this literal "jBloch" 6 times Define a constant instead of duplicating this literal "mFowler" 3 times * 508 : Sonar Qube FIxes Define a constant instead of duplicating this literal "username" 3 times. * 508: sonar qube issue fixes Define a constant instead of duplicating this literal "customerDao.getAllCustomers(): " 4 times. * 508 : sonar qube issue fixes Define a constant instead of duplicating this literal "App.main(), student : " 4 times. * 508 : sonar Qube issue fixes Define a constant instead of duplicating this literal "{} hits {}. {} is damaged!" 3 times. Define a constant instead of duplicating this literal "{} hits {}." 4 times. * 508 : Define a constant instead of duplicating this literal "{} hits {}." 4 times. * 508 : checkstyle fixes * 508: checkstyle fixes * 508: checkstyle fixes * 508: checkstyle fixes * 508: checkstyle fixes * 508: checkstyle fixes * 508: cqrs checkstyle fixes
This commit is contained in:
committed by
Ilkka Seppälä
parent
17bfc91f45
commit
c6ecf58687
@ -36,6 +36,8 @@ import org.apache.log4j.Logger;
|
||||
public final class App {
|
||||
|
||||
private static Logger log = Logger.getLogger(App.class);
|
||||
private static final String STUDENT_STRING = "App.main(), student : ";
|
||||
|
||||
|
||||
/**
|
||||
* Program entry point.
|
||||
@ -53,12 +55,12 @@ public final class App {
|
||||
/* Add student in respectibe store */
|
||||
mapper.insert(student);
|
||||
|
||||
log.debug("App.main(), student : " + student + ", is inserted");
|
||||
log.debug(STUDENT_STRING + student + ", is inserted");
|
||||
|
||||
/* Find this student */
|
||||
final Optional<Student> studentToBeFound = mapper.find(student.getStudentId());
|
||||
|
||||
log.debug("App.main(), student : " + studentToBeFound + ", is searched");
|
||||
log.debug(STUDENT_STRING + studentToBeFound + ", is searched");
|
||||
|
||||
/* Update existing student object */
|
||||
student = new Student(student.getStudentId(), "AdamUpdated", 'A');
|
||||
@ -66,8 +68,8 @@ public final class App {
|
||||
/* Update student in respectibe db */
|
||||
mapper.update(student);
|
||||
|
||||
log.debug("App.main(), student : " + student + ", is updated");
|
||||
log.debug("App.main(), student : " + student + ", is going to be deleted");
|
||||
log.debug(STUDENT_STRING + student + ", is updated");
|
||||
log.debug(STUDENT_STRING + student + ", is going to be deleted");
|
||||
|
||||
/* Delete student in db */
|
||||
mapper.delete(student);
|
||||
|
Reference in New Issue
Block a user