Author: lektran
Date: Mon Mar 22 17:15:07 2010
New Revision: 926199
URL:
http://svn.apache.org/viewvc?rev=926199&view=revLog:
Remove unnecessary null and length check after a string.split(String) call that always returns at least an array of length 1
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=926199&r1=926198&r2=926199&view=diff==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Mon Mar 22 17:15:07 2010
@@ -171,11 +171,9 @@ public class CmsEvents {
if (pathInfo.indexOf("/") != -1) {
String[] pathSplit = pathInfo.split("/");
if (Debug.verboseOn()) Debug.logVerbose("Split pathinfo: " + pathSplit.length, module);
- if (pathSplit != null && pathSplit.length > 0) {
- contentId = pathSplit[0];
- if (pathSplit.length > 1) {
- mapKey = pathSplit[1];
- }
+ contentId = pathSplit[0];
+ if (pathSplit.length > 1) {
+ mapKey = pathSplit[1];
}
} else {
contentId = pathInfo;