Return-Path: Delivered-To: apmail-ofbiz-commits-archive@www.apache.org Received: (qmail 63451 invoked from network); 5 May 2010 08:52:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 May 2010 08:52:03 -0000 Received: (qmail 53668 invoked by uid 500); 5 May 2010 08:52:03 -0000 Delivered-To: apmail-ofbiz-commits-archive@ofbiz.apache.org Received: (qmail 53650 invoked by uid 500); 5 May 2010 08:52:01 -0000 Mailing-List: contact commits-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list commits@ofbiz.apache.org Received: (qmail 53643 invoked by uid 99); 5 May 2010 08:52:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 08:52:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 08:51:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BA5E923888E8; Wed, 5 May 2010 08:51:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941205 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuFactory.java Date: Wed, 05 May 2010 08:51:07 -0000 To: commits@ofbiz.apache.org From: lektran@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100505085107.BA5E923888E8@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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 + "]"); }