svn commit: r1062146 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java

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

svn commit: r1062146 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java

mrisaliti
Author: mrisaliti
Date: Sat Jan 22 12:46:50 2011
New Revision: 1062146

URL: http://svn.apache.org/viewvc?rev=1062146&view=rev
Log:
Remove java compilation warnings of last two old methods of ContentServices (OFBIZ-4102)

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java?rev=1062146&r1=1062145&r2=1062146&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java Sat Jan 22 12:46:50 2011
@@ -863,14 +863,14 @@ public class ContentServices {
      * matching content.
      */
     public static Map<String, Object> renderSubContentAsText(DispatchContext dctx, Map<String, ? extends Object> context) {
-        Map results = FastMap.newInstance();
+        Map<String, Object> results = FastMap.newInstance();
         Delegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
 
-        Map templateContext = (Map) context.get("templateContext");
+        Map<String,Object> templateContext = UtilGenerics.checkMap(context.get("templateContext"));
         String contentId = (String) context.get("contentId");
-        Timestamp fromDate = (Timestamp) context.get("fromDate");
-        GenericValue userLogin = (GenericValue) context.get("userLogin");
+        // Timestamp fromDate = (Timestamp) context.get("fromDate");
+        // GenericValue userLogin = (GenericValue) context.get("userLogin");
 
         if (templateContext != null && UtilValidate.isEmpty(contentId)) {
             contentId = (String) templateContext.get("contentId");
@@ -924,12 +924,12 @@ public class ContentServices {
      * matching content.
      */
     public static Map<String, Object> renderContentAsText(DispatchContext dctx, Map<String, ? extends Object> context) {
-        Map results = FastMap.newInstance();
+        Map<String,Object> results = FastMap.newInstance();
         LocalDispatcher dispatcher = dctx.getDispatcher();
         Delegator delegator = dctx.getDelegator();
         Writer out = (Writer) context.get("outWriter");
 
-        Map templateContext = (Map) context.get("templateContext");
+        Map<String,Object> templateContext = UtilGenerics.checkMap(context.get("templateContext"));
         //GenericValue userLogin = (GenericValue)context.get("userLogin");
         String contentId = (String) context.get("contentId");
         if (templateContext != null && UtilValidate.isEmpty(contentId)) {