ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lekt...@apache.org
Subject svn commit: r941205 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java
Date Wed, 05 May 2010 08:51:07 GMT
Author: lektran
Date: Wed May  5 08:51:07 2010
New Revision: 941205

URL: http://svn.apache.org/viewvc?rev=941205&view=rev
Log:
Missed one of the calls to the now deprecated methods.  Removed a couple of unnecessary casts
while I was at it.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java?rev=941205&r1=941204&r2=941205&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java Wed May  5 08:51:07
2010
@@ -54,19 +54,16 @@ public class MenuFactory {
         String webappName = UtilHttp.getApplicationName(request);
         String cacheKey = webappName + "::" + resourceName;
 
-
         Map<String, ModelMenu> modelMenuMap = menuWebappCache.get(cacheKey);
         if (modelMenuMap == null) {
             synchronized (MenuFactory.class) {
                 modelMenuMap = menuWebappCache.get(cacheKey);
                 if (modelMenuMap == null) {
                     ServletContext servletContext = (ServletContext) request.getAttribute("servletContext");
-                    Delegator delegator = (Delegator) request.getAttribute("delegator");
-                    LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
 
                     URL menuFileUrl = servletContext.getResource(resourceName);
                     Document menuFileDoc = UtilXml.readXmlDocument(menuFileUrl, true);
-                    modelMenuMap = readMenuDocument(menuFileDoc, delegator, dispatcher, cacheKey);
+                    modelMenuMap = readMenuDocument(menuFileDoc, cacheKey);
                     menuWebappCache.put(cacheKey, modelMenuMap);
                 }
             }
@@ -76,7 +73,7 @@ public class MenuFactory {
             throw new IllegalArgumentException("Could not find menu file in webapp resource
[" + resourceName + "] in the webapp [" + webappName + "]");
         }
 
-        ModelMenu modelMenu = (ModelMenu) modelMenuMap.get(menuName);
+        ModelMenu modelMenu = modelMenuMap.get(menuName);
         if (modelMenu == null) {
             throw new IllegalArgumentException("Could not find menu with name [" + menuName
+ "] in webapp resource [" + resourceName + "] in the webapp [" + webappName + "]");
         }
@@ -126,7 +123,7 @@ public class MenuFactory {
             throw new IllegalArgumentException("Could not find menu file in location [" +
resourceName + "]");
         }
 
-        ModelMenu modelMenu = (ModelMenu) modelMenuMap.get(menuName);
+        ModelMenu modelMenu = modelMenuMap.get(menuName);
         if (modelMenu == null) {
             throw new IllegalArgumentException("Could not find menu with name [" + menuName
+ "] in location [" + resourceName + "]");
         }



Mime
View raw message