class hierarchy was throwing a null pointer exception when the all classes option was selected

This commit is contained in:
Tim Worrall 2015-03-20 15:33:22 -04:00
parent ed0b7f0f0d
commit 8f7a9beea5

View file

@ -46,7 +46,14 @@ public class ListVClassWebappsController extends FreemarkerHttpServlet {
body.put("displayOption", "all"); body.put("displayOption", "all");
body.put("pageTitle", "All Classes"); body.put("pageTitle", "All Classes");
if ( vreq.getParameter("propertyURI") != null ) {
body.put("propertyURI", vreq.getParameter("propertyURI")); body.put("propertyURI", vreq.getParameter("propertyURI"));
}
List<VClass> classes = null;
if (vreq.getParameter("showPropertyRestrictions") != null) {
if ( vreq.getParameter("propertyType").equals("object") ) { if ( vreq.getParameter("propertyType").equals("object") ) {
body.put("editController", "propertyEdit?uri="); body.put("editController", "propertyEdit?uri=");
} }
@ -54,9 +61,6 @@ public class ListVClassWebappsController extends FreemarkerHttpServlet {
body.put("editController", "datapropEdit?uri="); body.put("editController", "datapropEdit?uri=");
} }
List<VClass> classes = null;
if (vreq.getParameter("showPropertyRestrictions") != null) {
body.put("propertyName", vreq.getParameter("propertyName")); body.put("propertyName", vreq.getParameter("propertyName"));
PropertyDao pdao = vreq.getLanguageNeutralWebappDaoFactory().getObjectPropertyDao(); PropertyDao pdao = vreq.getLanguageNeutralWebappDaoFactory().getObjectPropertyDao();
classes = pdao.getClassesWithRestrictionOnProperty(vreq.getParameter("propertyURI")); classes = pdao.getClassesWithRestrictionOnProperty(vreq.getParameter("propertyURI"));