From b0c0c71cdbdfd3f631de437afaa6734c73c57e16 Mon Sep 17 00:00:00 2001 From: hudajkhan Date: Fri, 6 Dec 2013 16:44:47 -0500 Subject: [PATCH] if range uri is null, error message for null rangeVClass should not be thrown --- .../generators/DefaultObjectPropertyFormGenerator.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultObjectPropertyFormGenerator.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultObjectPropertyFormGenerator.java index 78a0adb3a..f6c2f95c1 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultObjectPropertyFormGenerator.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/DefaultObjectPropertyFormGenerator.java @@ -117,10 +117,11 @@ public class DefaultObjectPropertyFormGenerator implements EditConfigurationGene if(rangeUri != null && !rangeUri.isEmpty()) { WebappDaoFactory ctxDaoFact = vreq.getLanguageNeutralWebappDaoFactory(); rangeVClass = ctxDaoFact.getVClassDao().getVClassByURI(rangeUri); + if(rangeVClass == null) { + errorMessages = I18n.text(vreq,"the_range_class_does_not_exist"); + } } - if(rangeVClass == null) { - errorMessages = I18n.text(vreq,"the_range_class_does_not_exist"); - } + return errorMessages; }