mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
[DS-707] String comparisons
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5563 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -42,6 +42,7 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
@@ -141,7 +142,7 @@ public class SFXFileReader {
|
|||||||
String sfxfield = "";
|
String sfxfield = "";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while ((i < len) && (sfxfield == ""))
|
while ((i < len) && StringUtils.isEmpty(sfxfield))
|
||||||
{
|
{
|
||||||
Node nd = nl.item(i);
|
Node nd = nl.item(i);
|
||||||
if ((nd == null) || isEmptyTextNode(nd))
|
if ((nd == null) || isEmptyTextNode(nd))
|
||||||
@@ -211,7 +212,7 @@ public class SFXFileReader {
|
|||||||
{
|
{
|
||||||
qualifier = getValue(vn);
|
qualifier = getValue(vn);
|
||||||
finish ++;
|
finish ++;
|
||||||
if (qualifier == "")
|
if (StringUtils.isEmpty(qualifier))
|
||||||
{
|
{
|
||||||
qualifier = null;
|
qualifier = null;
|
||||||
}
|
}
|
||||||
|
@@ -349,7 +349,7 @@ public class MetadataFieldRegistryServlet extends DSpaceServlet
|
|||||||
}
|
}
|
||||||
|
|
||||||
String qualifier = request.getParameter("qualifier");
|
String qualifier = request.getParameter("qualifier");
|
||||||
if (qualifier == "")
|
if ("".equals(qualifier))
|
||||||
{
|
{
|
||||||
qualifier = null;
|
qualifier = null;
|
||||||
}
|
}
|
||||||
|
@@ -56,6 +56,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import javax.servlet.jsp.jstl.core.Config;
|
import javax.servlet.jsp.jstl.core.Config;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.app.util.Util;
|
import org.dspace.app.util.Util;
|
||||||
import org.dspace.authenticate.AuthenticationManager;
|
import org.dspace.authenticate.AuthenticationManager;
|
||||||
@@ -338,7 +339,7 @@ public class UIUtil extends Util
|
|||||||
Locale sessionLocale = null;
|
Locale sessionLocale = null;
|
||||||
Locale supportedLocale = null;
|
Locale supportedLocale = null;
|
||||||
|
|
||||||
if (paramLocale != null && paramLocale != "")
|
if (!StringUtils.isEmpty(paramLocale))
|
||||||
{
|
{
|
||||||
/* get session locale according to user selection */
|
/* get session locale according to user selection */
|
||||||
sessionLocale = new Locale(paramLocale);
|
sessionLocale = new Locale(paramLocale);
|
||||||
|
@@ -51,6 +51,7 @@ import org.apache.avalon.framework.service.ServiceManager;
|
|||||||
import org.apache.avalon.framework.service.Serviceable;
|
import org.apache.avalon.framework.service.Serviceable;
|
||||||
import org.apache.cocoon.environment.ObjectModelHelper;
|
import org.apache.cocoon.environment.ObjectModelHelper;
|
||||||
import org.apache.cocoon.environment.Request;
|
import org.apache.cocoon.environment.Request;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer;
|
import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer;
|
||||||
import org.dspace.app.xmlui.utils.UIException;
|
import org.dspace.app.xmlui.utils.UIException;
|
||||||
import org.dspace.app.xmlui.wing.Message;
|
import org.dspace.app.xmlui.wing.Message;
|
||||||
@@ -858,14 +859,14 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
|
|
||||||
generatorSettings.addLabel(T_harvest_label_oai_url);
|
generatorSettings.addLabel(T_harvest_label_oai_url);
|
||||||
String oaiUrl = ConfigurationManager.getProperty("dspace.oai.url");
|
String oaiUrl = ConfigurationManager.getProperty("dspace.oai.url");
|
||||||
if (oaiUrl != null && oaiUrl != "")
|
if (!StringUtils.isEmpty(oaiUrl))
|
||||||
{
|
{
|
||||||
generatorSettings.addItem(oaiUrl);
|
generatorSettings.addItem(oaiUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
generatorSettings.addLabel(T_harvest_label_oai_source);
|
generatorSettings.addLabel(T_harvest_label_oai_source);
|
||||||
String oaiAuthoritativeSource = ConfigurationManager.getProperty("ore.authoritative.source");
|
String oaiAuthoritativeSource = ConfigurationManager.getProperty("ore.authoritative.source");
|
||||||
if (oaiAuthoritativeSource != null && oaiAuthoritativeSource != "")
|
if (!StringUtils.isEmpty(oaiAuthoritativeSource))
|
||||||
{
|
{
|
||||||
generatorSettings.addItem(oaiAuthoritativeSource);
|
generatorSettings.addItem(oaiAuthoritativeSource);
|
||||||
}
|
}
|
||||||
|
@@ -90,7 +90,7 @@ public class DeleteCollectionRoleConfirm extends AbstractDSpaceTransformer
|
|||||||
Division main = body.addInteractiveDivision("collection-role-delete",contextPath+"/admin/collection",Division.METHOD_POST,"primary administrative collection");
|
Division main = body.addInteractiveDivision("collection-role-delete",contextPath+"/admin/collection",Division.METHOD_POST,"primary administrative collection");
|
||||||
main.setHead(T_main_head.parameterize(role));
|
main.setHead(T_main_head.parameterize(role));
|
||||||
// Different help message for the default read group to enforce its non-retroactive nature
|
// Different help message for the default read group to enforce its non-retroactive nature
|
||||||
if (role == "DEFAULT_READ")
|
if ("DEFAULT_READ".equals(role))
|
||||||
{
|
{
|
||||||
main.addPara(T_main_para_read.parameterize(toBeDeleted.getName()));
|
main.addPara(T_main_para_read.parameterize(toBeDeleted.getName()));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user