Details
Description
It looks like this is a regression from SAK-32104
If you create a site without the Lessons tool, sitestats throwns this NPE.
26-Apr-2018 10:39:03.768 ERROR [http-nio-8080-exec-7] org.sakaiproject.sitestats.tool.wicket.widget.LessonsWidget.getTotalPages Caught exception while getting the page total. Setting totalPages to 0 ... java.lang.NullPointerException at org.sakaiproject.sitestats.impl.StatsManagerImpl.getTotalLessonPages(StatsManagerImpl.java:879)
I believe this is because getSitePages returns a null when the site doesn't have lessons.
return lessonBuilderService.getSitePages(siteId).size();
Even though this doesn't seem to cause a user facing error, this should be caught to avoid the stack trace in the logs.