Missing NPE Check in SimplePageBean getCurrentPageItem
GENERAL
TESTING
GENERAL
TESTING
Description
In this block here for 1.4.x (Revision 116853) we had an instructor encounter an NPE. java.lang.NullPointerException at org.sakaiproject.lessonbuildertool.tool.beans.SimplePageBean.getCurrentPageItem(SimplePageBean.java:1632) at org.sakaiproject.lessonbuildertool.tool.producers.ShowPageProducer.fillComponents(ShowPageProducer.java:442) at uk.org.ponder.rsf.view.support.ViewCollector.fillComponents(ViewCollector.java:56) . . .
In trunk that corresponds to line 1686. Somehow the ret is null from this simplePageToolDao. I'm not sure how to reproduce it though. He was unable to access for a few times but it eventually started working. Should probably be an NPE check around this condition but not testable unless you know how it could happen?
In this block here for 1.4.x (Revision 116853) we had an instructor encounter an NPE.
java.lang.NullPointerException
at org.sakaiproject.lessonbuildertool.tool.beans.SimplePageBean.getCurrentPageItem(SimplePageBean.java:1632)
at org.sakaiproject.lessonbuildertool.tool.producers.ShowPageProducer.fillComponents(ShowPageProducer.java:442)
at uk.org.ponder.rsf.view.support.ViewCollector.fillComponents(ViewCollector.java:56)
. . .
In trunk that corresponds to line 1686. Somehow the ret is null from this simplePageToolDao. I'm not sure how to reproduce it though. He was unable to access for a few times but it eventually started working. Should probably be an NPE check around this condition but not testable unless you know how it could happen?
Thanks
1682 if(ret == null && page.getOwner() != null) {
1683 ret = simplePageToolDao.findItemFromStudentPage(page.getPageId());
1684 }
1685 try {
1686 updatePageItem(ret.getId());
1687 } catch (PermissionException e) {