From 4ea2ae107b9d632207d5948a9fa5ebe48e5eddfe Mon Sep 17 00:00:00 2001 From: bdc34 Date: Sat, 3 Apr 2010 21:44:23 +0000 Subject: [PATCH] Fixing bug in PropertyEditLinks when requesting an edit link for a property that doesn't exist. --- .../vitro/webapp/web/jsptags/PropertyEditLinks.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java index 54b4d0779..7dbfd1604 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/PropertyEditLinks.java @@ -360,7 +360,14 @@ public class PropertyEditLinks extends TagSupport{ String value = dpropStmt.getData(); Model model = (Model)pageContext.getServletContext().getAttribute("jenaOntModel"); - String dpropHash = String.valueOf(RdfLiteralHash.makeVitroNsLiteralHash( subject, predicateUri, value, model )); + String dpropHash = null; + try{ + dpropHash = String.valueOf(RdfLiteralHash.makeVitroNsLiteralHash( subject, predicateUri, value, model )); + }catch(IllegalArgumentException ex){ + log.debug("could not create hash for " + subject + " " + predicateUri + " " + value); + return links; + } + String dispatchUrl = contextPath + "edit/editDatapropStmtRequestDispatch.jsp"; int index = 0;