Trimed variables

This commit is contained in:
Marcin Woźniak 2020-08-19 16:54:45 +02:00
parent 2812b81f72
commit de327379e5

View File

@ -73,12 +73,12 @@ public class FileToDatabaseMigrator {
String lecturer_surname = ""; String lecturer_surname = "";
String lecturer_name = ""; String lecturer_name = "";
String course_name = course_name_cell.toString(); String course_name = course_name_cell.toString().trim();
String sym_str = sym.toString(); String sym_str = sym.toString().trim();
int day = (int) Double.parseDouble(day_cell.toString()); int day = (int) Double.parseDouble(day_cell.toString());
WeekDay group_day = WeekDay.getDay(day); WeekDay group_day = WeekDay.getDay(day);
String room = room_cell.toString(); String room = room_cell.toString().trim();
int time = this.parseTimeToInt(time_cell.toString()); int time = this.parseTimeToInt(time_cell.toString());
int capacity = (int) Double.parseDouble(capacity_cell.toString()); int capacity = (int) Double.parseDouble(capacity_cell.toString());
@ -96,13 +96,13 @@ public class FileToDatabaseMigrator {
courseService.save(course); courseService.save(course);
if (title_cell != null) { if (title_cell != null) {
lecturer_title = title_cell.toString(); lecturer_title = title_cell.toString().trim();
} }
if (name_cell != null) { if (name_cell != null) {
lecturer_name = name_cell.toString(); lecturer_name = name_cell.toString().trim();
} }
if (surname_cell != null) { if (surname_cell != null) {
lecturer_surname = surname_cell.toString(); lecturer_surname = surname_cell.toString().trim();
} }
Lecturer lecturer = lecturerService.getLecturer(lecturer_title, lecturer_name, lecturer_surname); Lecturer lecturer = lecturerService.getLecturer(lecturer_title, lecturer_name, lecturer_surname);