[DS-707] Null handling

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5578 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2010-10-24 06:51:30 +00:00
parent 5061e41c6c
commit 72e9793c81
2 changed files with 3 additions and 2 deletions

View File

@@ -681,7 +681,7 @@ public class Item extends DSpaceObject
dcv.schema = schema;
dcv.element = element;
dcv.qualifier = qualifier;
dcv.language = (lang == null ? lang : lang.trim());
dcv.language = (lang == null ? null : lang.trim());
// Logic to set Authority and Confidence:
// - normalize an empty string for authority to NULL.

View File

@@ -51,6 +51,7 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.dspace.app.util.AuthorizeUtil;
import org.dspace.app.webui.servlet.DSpaceServlet;
@@ -519,7 +520,7 @@ public class CollectionWizardServlet extends DSpaceServlet
// nothing was entered
String license = wrapper.getParameter("license");
if ((license != null) || "".equals(license))
if (!StringUtils.isEmpty(license))
{
collection.setLicense(license);
}