From 16c2f9ee1a03402fc1c3d268d5b0aea77de95511 Mon Sep 17 00:00:00 2001 From: "Code Hugger (Matthew Jones)" Date: Sat, 15 Apr 2017 17:08:09 -0500 Subject: [PATCH] LSNBLDR-800 - Stacktrace when viewing a page that doesn't have a valid sakaiId (#4256) --- .../tool/producers/ShowPageProducer.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ShowPageProducer.java b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ShowPageProducer.java index 54444469f989..72b187985f0b 100644 --- a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ShowPageProducer.java +++ b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ShowPageProducer.java @@ -1551,11 +1551,13 @@ else if (forum.notPublished()) itemGroupString = simplePageBean.getItemGroupString(i, null, true); UIOutput.make(tableRow, "item-groups", itemGroupString); SimplePage sPage = simplePageBean.getPage(Long.parseLong(i.getSakaiId())); - Date rDate = sPage.getReleaseDate(); - String rDateString = ""; - if(rDate != null) - rDateString = rDate.toString(); - UIOutput.make(tableRow, "subpagereleasedate", rDateString); + if (sPage != null) { + Date rDate = sPage.getReleaseDate(); + String rDateString = ""; + if(rDate != null) + rDateString = rDate.toString(); + UIOutput.make(tableRow, "subpagereleasedate", rDateString); + } } else if (i.getType() == SimplePageItem.RESOURCE) { try { itemGroupString = simplePageBean.getItemGroupStringOrErr(i, null, true);