svn commit: r1770543 - in /ofbiz/trunk: applications/content/src/main/java/org/apache/ofbiz/content/cms/ContentJsonEvents.java framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1770543 - in /ofbiz/trunk: applications/content/src/main/java/org/apache/ofbiz/content/cms/ContentJsonEvents.java framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java

jleroux@apache.org
Author: jleroux
Date: Sun Nov 20 10:11:58 2016
New Revision: 1770543

URL: http://svn.apache.org/viewvc?rev=1770543&view=rev
Log:
No functional changes:  
.getAttribute() never returns null, it defaults to empty
Removes commented out import net.sf.json imports we use Jackson only (no license
issues)

Modified:
    ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/ContentJsonEvents.java
    ofbiz/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java

Modified: ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/ContentJsonEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/ContentJsonEvents.java?rev=1770543&r1=1770542&r2=1770543&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/ContentJsonEvents.java (original)
+++ ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/cms/ContentJsonEvents.java Sun Nov 20 10:11:58 2016
@@ -31,10 +31,6 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.collections4.CollectionUtils;
-
-//import net.sf.json.JSONArray;
-//import net.sf.json.JSONObject;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.ofbiz.base.lang.JSON;
 import org.apache.ofbiz.base.util.UtilDateTime;

Modified: ofbiz/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java?rev=1770543&r1=1770542&r2=1770543&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java (original)
+++ ofbiz/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ConfigXMLReader.java Sun Nov 20 10:11:58 2016
@@ -402,7 +402,7 @@ public class ConfigXMLReader {
             if (firstvisitElement != null) {
                 for (Element eventElement : UtilXml.childElementList(firstvisitElement, "event")) {
                     String eventName = eventElement.getAttribute("name");
-                    if (UtilValidate.isEmpty(eventName)) {
+                    if (eventName.isEmpty()) {
                         eventName = eventElement.getAttribute("type") + "::" + eventElement.getAttribute("path") + "::" + eventElement.getAttribute("invoke");
                     }
                     this.firstVisitEventList.put(eventName, new Event(eventElement));
@@ -413,7 +413,7 @@ public class ConfigXMLReader {
             if (preprocessorElement != null) {
                 for (Element eventElement : UtilXml.childElementList(preprocessorElement, "event")) {
                     String eventName = eventElement.getAttribute("name");
-                    if (UtilValidate.isEmpty(eventName)) {
+                    if (eventName.isEmpty()) {
                         eventName = eventElement.getAttribute("type") + "::" + eventElement.getAttribute("path") + "::" + eventElement.getAttribute("invoke");
                     }
                     this.preprocessorEventList.put(eventName, new Event(eventElement));
@@ -424,7 +424,7 @@ public class ConfigXMLReader {
             if (postprocessorElement != null) {
                 for (Element eventElement : UtilXml.childElementList(postprocessorElement, "event")) {
                     String eventName = eventElement.getAttribute("name");
-                    if (UtilValidate.isEmpty(eventName)) {
+                    if (eventName.isEmpty()) {
                         eventName = eventElement.getAttribute("type") + "::" + eventElement.getAttribute("path") + "::" + eventElement.getAttribute("invoke");
                     }
                     this.postprocessorEventList.put(eventName, new Event(eventElement));
@@ -435,7 +435,7 @@ public class ConfigXMLReader {
             if (afterLoginElement != null) {
                 for (Element eventElement : UtilXml.childElementList(afterLoginElement, "event")) {
                     String eventName = eventElement.getAttribute("name");
-                    if (UtilValidate.isEmpty(eventName)) {
+                    if (eventName.isEmpty()) {
                         eventName = eventElement.getAttribute("type") + "::" + eventElement.getAttribute("path") + "::" + eventElement.getAttribute("invoke");
                     }
                     this.afterLoginEventList.put(eventName, new Event(eventElement));
@@ -446,7 +446,7 @@ public class ConfigXMLReader {
             if (beforeLogoutElement != null) {
                 for (Element eventElement : UtilXml.childElementList(beforeLogoutElement, "event")) {
                     String eventName = eventElement.getAttribute("name");
-                    if (UtilValidate.isEmpty(eventName)) {
+                    if (eventName.isEmpty()) {
                         eventName = eventElement.getAttribute("type") + "::" + eventElement.getAttribute("path") + "::" + eventElement.getAttribute("invoke");
                     }
                     this.beforeLogoutEventList.put(eventName, new Event(eventElement));
@@ -471,7 +471,7 @@ public class ConfigXMLReader {
         protected void loadIncludes(Element rootElement) {
             for (Element includeElement : UtilXml.childElementList(rootElement, "include")) {
                 String includeLocation = includeElement.getAttribute("location");
-                if (UtilValidate.isNotEmpty(includeLocation)) {
+                if (!includeLocation.isEmpty()) {
                     try {
                         URL urlLocation = FlexibleLocation.resolveLocation(includeLocation);
                         includes.add(urlLocation);
@@ -626,7 +626,7 @@ public class ConfigXMLReader {
                     this.redirectParameterValueMap.put(redirectParameterElement.getAttribute("name"), redirectParameterElement.getAttribute("value"));
                 } else {
                     String from = redirectParameterElement.getAttribute("from");
-                    if (UtilValidate.isEmpty(from))
+                    if (from.isEmpty())
                         from = redirectParameterElement.getAttribute("name");
                     this.redirectParameterMap.put(redirectParameterElement.getAttribute("name"), from);
                 }