Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/portlets/newsletter
In directory
james.mmbase.org:/tmp/cvs-serv30840/portlets-newsletter/src/java/com/finalist/portlets/newsletter
Modified Files:
NewsletterContentPortlet.java
Log Message:
CMSC-900 Use commons.lang.SringUtils for string emptiness
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/portlets/newsletter
See also: http://www.mmbase.org/jira/browse/CMSC-900
Index: NewsletterContentPortlet.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/portlets/newsletter/NewsletterContentPortlet.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- NewsletterContentPortlet.java 8 May 2008 09:13:32 -0000 1.23
+++ NewsletterContentPortlet.java 10 May 2008 16:32:16 -0000 1.24
@@ -12,7 +12,7 @@
import org.apache.commons.lang.StringUtils;
-import net.sf.mmapps.commons.util.StringUtil;
+import org.apache.commons.lang.StringUtils;
import com.finalist.cmsc.beans.om.ContentElement;
import com.finalist.cmsc.beans.om.NavigationItem;
@@ -75,14 +75,14 @@
protected void addContentElements(RenderRequest req, int itemNumber) {
String elementId = req.getParameter(ELEMENT_ID);
- if (StringUtil.isEmpty(elementId)) {
+ if (StringUtils.isEmpty(elementId)) {
PortletPreferences preferences = req.getPreferences();
String portletId =
preferences.getValue(PortalConstants.CMSC_OM_PORTLET_ID, null);
List<String> contenttypes = SiteManagement.getContentTypes(portletId);
int offset = 0;
String currentOffset = req.getParameter(OFFSET);
- if (!StringUtil.isEmpty(currentOffset)) {
+ if (StringUtils.isNotEmpty(currentOffset)) {
offset = Integer.parseInt(currentOffset);
}
int startIndex = Integer.parseInt(preferences.getValue(START_INDEX,
"1")) - 1;
@@ -134,12 +134,12 @@
setAttribute(req, ELEMENTS_PER_PAGE, elementsPerPage);
String pagesIndex = preferences.getValue(PAGES_INDEX, null);
- if (StringUtil.isEmpty(pagesIndex)) {
+ if (StringUtils.isEmpty(pagesIndex)) {
setAttribute(req, PAGES_INDEX, "center");
}
String showPages = preferences.getValue(SHOW_PAGES, null);
- if (StringUtil.isEmpty(showPages)) {
+ if (StringUtils.isEmpty(showPages)) {
setAttribute(req, SHOW_PAGES, 10);
}
@@ -150,7 +150,7 @@
setAttribute(req, USE_PAGING, usePaging);
String indexPosition = preferences.getValue(INDEX_POSITION, null);
- if (StringUtil.isEmpty(indexPosition)) {
+ if (StringUtils.isEmpty(indexPosition)) {
setAttribute(req, INDEX_POSITION, "bottom");
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs