Skip to content

Commit

Permalink
KNL-700 Replace use of StringUtil.trimto null with common-lang method
Browse files Browse the repository at this point in the history
Patch from Jean-François Lévêque ([email protected])



git-svn-id: https://source.sakaiproject.org/svn/alias/trunk@90872 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
Aaron Zeckoski committed Mar 29, 2011
1 parent 709e9c4 commit bff40d2
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import java.util.Iterator;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import org.sakaiproject.alias.api.AliasEdit;
import org.sakaiproject.alias.cover.AliasService;
import org.sakaiproject.authz.cover.SecurityService;
Expand All @@ -47,7 +49,6 @@
import org.sakaiproject.exception.InUseException;
import org.sakaiproject.exception.PermissionException;
import org.sakaiproject.util.ResourceLoader;
import org.sakaiproject.util.StringUtil;

/**
* <p>
Expand Down Expand Up @@ -465,8 +466,8 @@ public void doCancel_remove(RunData data, Context context)
private boolean readAliasForm(RunData data, SessionState state)
{
// read the form
String id = StringUtil.trimToNull(data.getParameters().getString("id"));
String target = StringUtil.trimToNull(data.getParameters().getString("target"));
String id = StringUtils.trimToNull(data.getParameters().getString("id"));
String target = StringUtils.trimToNull(data.getParameters().getString("target"));

// get the alias
AliasEdit alias = (AliasEdit) state.getAttribute("alias");
Expand Down Expand Up @@ -515,7 +516,7 @@ private boolean readAliasForm(RunData data, SessionState state)
protected List readResourcesPage(SessionState state, int first, int last)
{
// search?
String search = StringUtil.trimToNull((String) state.getAttribute(STATE_SEARCH));
String search = StringUtils.trimToNull((String) state.getAttribute(STATE_SEARCH));

if (search != null)
{
Expand All @@ -531,7 +532,7 @@ protected List readResourcesPage(SessionState state, int first, int last)
protected int sizeResources(SessionState state)
{
// search?
String search = StringUtil.trimToNull((String) state.getAttribute(STATE_SEARCH));
String search = StringUtils.trimToNull((String) state.getAttribute(STATE_SEARCH));

if (search != null)
{
Expand Down

0 comments on commit bff40d2

Please sign in to comment.