cmput402-w19 / assignment4tdd-beartrails

assignment4tdd-beartrails created by GitHub Classroom
0 stars 0 forks source link

Viewing teacher's schedule gives NullPointerException #23

Closed corey1994 closed 5 years ago

corey1994 commented 5 years ago

Steps (with database that I committed):

  1. Log in as "teacher"
  2. Select "View Schedule" voila

Note that "teacher" is assigned to a course. So it is not a lack of courses that's causing the issue.

It's likely a SQL syntax error, as that causes connectionManager.query() to return null;

Enter your username: teacher Login successful!

1 List all courses 2 View schedule 3 Assign a grade Select an option (1-3): 2 Exception in thread "main" java.lang.NullPointerException at cmput402.beartrails.ScheduleManager.getTeacherSchedule(ScheduleManager.java:49) at cmput402.beartrails.ui.menu.ViewTeacherScheduleMenuAction.execute(ViewTeacherScheduleMenuAction.java:20) at cmput402.beartrails.ui.menu.Menu.go(Menu.java:83) at cmput402.beartrails.App.main(App.java:77)