svn commit: r1802657 - /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java

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

svn commit: r1802657 - /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java

Arun Patidar-4
Author: arunpatidar
Date: Sat Jul 22 06:32:44 2017
New Revision: 1802657

URL: http://svn.apache.org/viewvc?rev=1802657&view=rev
Log:
Screen rendering error on ViewForumMessage page. Handled NPE. (OFBIZ-9362)
Applied slightly modified patch. Thanks Priya Sharma for your contribution.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java

Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java?rev=1802657&r1=1802656&r2=1802657&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java Sat Jul 22 06:32:44 2017
@@ -93,7 +93,8 @@ public class RenderSubContentCacheTransf
         }
         // This order is taken so that the dataResourceType can be overridden in the transform arguments.
         String subDataResourceTypeId = (String)templateRoot.get("subDataResourceTypeId");
-        if (UtilValidate.isEmpty(subDataResourceTypeId)) {
+
+        if (UtilValidate.isEmpty(subDataResourceTypeId) && view != null ) {
             try {
                 subDataResourceTypeId = (String) view.get("drDataResourceTypeId");
             } catch (IllegalArgumentException e) {