Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-search/src/java/com/finalist/cmsc/portlets
In directory
james.mmbase.org:/tmp/cvs-serv30840/portlets-search/src/java/com/finalist/cmsc/portlets
Modified Files:
SearchPortlet.java
Log Message:
CMSC-900 Use commons.lang.SringUtils for string emptiness
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-search/src/java/com/finalist/cmsc/portlets
See also: http://www.mmbase.org/jira/browse/CMSC-900
Index: SearchPortlet.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-search/src/java/com/finalist/cmsc/portlets/SearchPortlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- SearchPortlet.java 12 Apr 2008 14:25:37 -0000 1.3
+++ SearchPortlet.java 10 May 2008 16:32:16 -0000 1.4
@@ -10,7 +10,7 @@
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import net.sf.mmapps.commons.util.StringUtil;
+import org.apache.commons.lang.StringUtils;
import com.finalist.cmsc.portalImpl.PortalConstants;
import com.finalist.pluto.portalImpl.core.CmscPortletMode;
@@ -19,7 +19,7 @@
* Fulltext search portlet
*
* @author Wouter Heijke
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SearchPortlet extends CmscPortlet {
@@ -129,7 +129,7 @@
int offset = 0;
String currentOffset = req.getParameter(OFFSET);
- if (!StringUtil.isEmpty(currentOffset)) {
+ if (StringUtils.isNotEmpty(currentOffset)) {
offset = Integer.parseInt(currentOffset);
}
setAttribute(req, "offset", offset);
@@ -146,22 +146,22 @@
setAttribute(req, ELEMENTS_PER_PAGE, elementsPerPage);
String showPages = preferences.getValue(SHOW_PAGES, null);
- if (StringUtil.isEmpty(showPages)) {
+ if (StringUtils.isEmpty(showPages)) {
setAttribute(req, SHOW_PAGES, 10);
}
String indexPosition = preferences.getValue(INDEX_POSITION, null);
- if (StringUtil.isEmpty(indexPosition)) {
+ if (StringUtils.isEmpty(indexPosition)) {
setAttribute(req, INDEX_POSITION, "bottom");
}
String pagesIndex = preferences.getValue(PAGES_INDEX, null);
- if (StringUtil.isEmpty(pagesIndex)) {
+ if (StringUtils.isEmpty(pagesIndex)) {
setAttribute(req, PAGES_INDEX, "center");
}
String indexName = preferences.getValue(SEARCH_INDEX, null);
- if (StringUtil.isEmpty(indexName)) {
+ if (StringUtils.isEmpty(indexName)) {
setAttribute(req, SEARCH_INDEX, "cmsc");
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs