Author: jacopoc
Date: Sat Dec 2 02:45:01 2006 New Revision: 481546 URL: http://svn.apache.org/viewvc?view=rev&rev=481546 Log: Applied patch from Stefan Huehner (OFBIZ-511), to remove some unnecessary casts where the source-type and the casted-to type are identical. Modified: incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java incubator/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/template/FreeMarkerWorker.java incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/status/StatusServices.java incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestManager.java incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Modified: incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original) +++ incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Sat Dec 2 02:45:01 2006 @@ -114,7 +114,7 @@ context.put("billItems", orderItems); } // get the system userid and store in context otherwise the invoice add service does not work - GenericValue userLogin = (GenericValue) delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); + GenericValue userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system")); if (userLogin != null) { context.put("userLogin", userLogin); } Modified: incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original) +++ incubator/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Sat Dec 2 02:45:01 2006 @@ -400,8 +400,8 @@ } private static void buildInvoiceInfo(Map params, Properties props, Map AIMRequest) { - String description = (String) UtilFormatOut.checkNull(props.getProperty("transDescription")); - String orderId = (String) UtilFormatOut.checkNull((String)params.get("orderId")); + String description = UtilFormatOut.checkNull(props.getProperty("transDescription")); + String orderId = UtilFormatOut.checkNull((String)params.get("orderId")); AIMRequest.put("x_Invoice_Num","Order " + orderId); AIMRequest.put("x_Description", description); return; @@ -411,8 +411,8 @@ GenericValue cc = (GenericValue)params.get("creditCard"); String currency = (String) params.get("currency"); String amount = ((Double)params.get("processAmount")).toString(); - String number = (String) UtilFormatOut.checkNull(cc.getString("cardNumber")); - String expDate = (String) UtilFormatOut.checkNull(cc.getString("expireDate")); + String number = UtilFormatOut.checkNull(cc.getString("cardNumber")); + String expDate = UtilFormatOut.checkNull(cc.getString("expireDate")); AIMRequest.put("x_Amount",amount); AIMRequest.put("x_Currency_Code",currency); @@ -428,8 +428,8 @@ GenericValue cc = (GenericValue)params.get("creditCard"); String currency = (String) params.get("currency"); String amount = ((Double)params.get("captureAmount")).toString(); - String number = (String) UtilFormatOut.checkNull(cc.getString("cardNumber")); - String expDate = (String) UtilFormatOut.checkNull(cc.getString("expireDate")); + String number = UtilFormatOut.checkNull(cc.getString("cardNumber")); + String expDate = UtilFormatOut.checkNull(cc.getString("expireDate")); AIMRequest.put("x_Amount",amount); AIMRequest.put("x_Currency_Code",currency); @@ -446,8 +446,8 @@ GenericValue cc = (GenericValue)params.get("creditCard"); String currency = (String) params.get("currency"); String amount = ((Double)params.get("refundAmount")).toString(); - String number = (String) UtilFormatOut.checkNull(cc.getString("cardNumber")); - String expDate = (String) UtilFormatOut.checkNull(cc.getString("expireDate")); + String number = UtilFormatOut.checkNull(cc.getString("cardNumber")); + String expDate = UtilFormatOut.checkNull(cc.getString("expireDate")); AIMRequest.put("x_Amount",amount); AIMRequest.put("x_Currency_Code",currency); @@ -482,7 +482,7 @@ results.put("authRefNum", ar.getResponseField(AuthorizeResponse.TRANSACTION_ID)); results.put("cvCode", ar.getResponseField(AuthorizeResponse.CID_RESPONSE_CODE)); results.put("avsCode", ar.getResponseField(AuthorizeResponse.AVS_RESULT_CODE)); - results.put("processAmount", new Double((String)ar.getResponseField(AuthorizeResponse.AMOUNT))); + results.put("processAmount", new Double(ar.getResponseField(AuthorizeResponse.AMOUNT))); } else { results.put("authCode", ar.getResponseCode()); results.put("processAmount", new Double("0.00")); @@ -503,7 +503,7 @@ if(captureResult.booleanValue()) { //passed results.put("captureCode", ar.getResponseField(AuthorizeResponse.AUTHORIZATION_CODE)); results.put("captureRefNum", ar.getResponseField(AuthorizeResponse.TRANSACTION_ID)); - results.put("captureAmount", new Double((String)ar.getResponseField(AuthorizeResponse.AMOUNT))); + results.put("captureAmount", new Double(ar.getResponseField(AuthorizeResponse.AMOUNT))); } else { results.put("captureAmount", new Double("0.00")); @@ -522,7 +522,7 @@ if(captureResult.booleanValue()) { //passed results.put("refundCode", ar.getResponseField(AuthorizeResponse.AUTHORIZATION_CODE)); results.put("refundRefNum", ar.getResponseField(AuthorizeResponse.TRANSACTION_ID)); - results.put("refundAmount", new Double((String)ar.getResponseField(AuthorizeResponse.AMOUNT))); + results.put("refundAmount", new Double(ar.getResponseField(AuthorizeResponse.AMOUNT))); } else { results.put("refundAmount", new Double("0.00")); Modified: incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java (original) +++ incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementEvents.java Sat Dec 2 02:45:01 2006 @@ -104,7 +104,7 @@ Iterator itPubPt = permittedPublishPointList.iterator(); while (itPubPt.hasNext()) { String [] pubArr = (String [])itPubPt.next(); - String pubContentId = (String)pubArr[0]; + String pubContentId = pubArr[0]; String pubValue = (String)map.get(pubContentId); String paramName = Integer.toString(counter) + "_" + pubContentId; String paramValue = (String)paramMap.get(paramName); Modified: incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java (original) +++ incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java Sat Dec 2 02:45:01 2006 @@ -191,7 +191,7 @@ GenericValue dataResource = delegator.findByPrimaryKey("DataResource", UtilMisc.toMap("dataResourceId", thisDataResourceId)); String inputMimeType = null; if(dataResource != null) { - inputMimeType = (String)dataResource.getString("mimeTypeId"); + inputMimeType = dataResource.getString("mimeTypeId"); } byte [] inputByteArray = null; PdfReader reader = null; @@ -340,7 +340,7 @@ } String inputMimeType = null; if(dataResource != null) { - inputMimeType = (String)dataResource.getString("mimeTypeId"); + inputMimeType = dataResource.getString("mimeTypeId"); } byte [] inputByteArray = null; if (inputMimeType != null && inputMimeType.equals("application/pdf")) { Modified: incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java (original) +++ incubator/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java Sat Dec 2 02:45:01 2006 @@ -224,7 +224,7 @@ String str = null; String s = null; for (int i=0; i < fieldTitles.length; i++) { - String opField = (String)fieldTitles[i]; + String opField = fieldTitles[i]; sb.append("<td class=\"headr\">"); sb.append(opField); sb.append("</td>"); @@ -270,7 +270,7 @@ String str = null; String s = null; for (int i=0; i < opFields.length; i++) { - String opField = (String)opFields[i]; + String opField = opFields[i]; sb.append("<td class=\"target\">"); s = (String)currentContentResultMap.get(opField); if (s != null) @@ -293,7 +293,7 @@ boolean isPass = true; for (int i=0; i < opFields.length; i++) { - String opField = (String)opFields[i]; + String opField = opFields[i]; Boolean bool = (Boolean)rMap.get(opField + "Cond"); String cls = (bool.booleanValue()) ? "pass" : "fail"; if (!bool.booleanValue()) Modified: incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original) +++ incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Sat Dec 2 02:45:01 2006 @@ -533,7 +533,7 @@ oldProductId = ""; while (iteratorListInventoryEventForMRP.hasNext()) { inventoryEventForMRP = (GenericValue) iteratorListInventoryEventForMRP.next(); - productId = (String) inventoryEventForMRP.getString("productId"); + productId = inventoryEventForMRP.getString("productId"); eventQuantity = inventoryEventForMRP.getDouble("eventQuantity").doubleValue(); if (!productId.equals(oldProductId)) { @@ -541,7 +541,7 @@ // It's a new product, so it's necessary to read the MrpQoh try { product = inventoryEventForMRP.getRelatedOneCache("Product"); - productFacility = (GenericValue)EntityUtil.getFirst(product.getRelatedByAndCache("ProductFacility", UtilMisc.toMap("facilityId", facilityId))); + productFacility = EntityUtil.getFirst(product.getRelatedByAndCache("ProductFacility", UtilMisc.toMap("facilityId", facilityId))); } catch (GenericEntityException e) { return ServiceUtil.returnError("Problem, can not find the product for a event, for more detail look at the log"); } Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Sat Dec 2 02:45:01 2006 @@ -109,7 +109,7 @@ while (!foundUniqueNewCode) { newAccountCode = new StringBuffer(codeLength); for (int i = 0; i < codeLength; i++) { - newAccountCode.append(char_pool[(int) r.nextInt(char_pool.length)]); + newAccountCode.append(char_pool[r.nextInt(char_pool.length)]); } List existingAccountsWithCode = delegator.findByAnd("FinAccount", UtilMisc.toMap("finAccountCode", newAccountCode.toString())); Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sat Dec 2 02:45:01 2006 @@ -181,7 +181,7 @@ if (adjustments == null) adjustments = new ArrayList(); } - return (List) adjustments; + return adjustments; } public List getPaymentPreferences() { @@ -299,7 +299,7 @@ Debug.logError(e, module); } } - return (List) orderStatuses; + return orderStatuses; } public List getOrderTerms() { Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sat Dec 2 02:45:01 2006 @@ -240,7 +240,7 @@ if (productStoreEmail != null && emailAddress != null) { String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = (String) ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); + bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); } sendMap.put("bodyScreenUri", bodyScreenLocation); Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Sat Dec 2 02:45:01 2006 @@ -222,7 +222,7 @@ reservStartStr += " 00:00:00.000000000"; // should have format: yyyy-mm-dd hh:mm:ss.fffffffff if (reservStartStr.length() >0) { try { - reservStart = java.sql.Timestamp.valueOf((String) reservStartStr); + reservStart = java.sql.Timestamp.valueOf(reservStartStr); } catch (Exception e) { Debug.logWarning(e,"Problems parsing Reservation start string: " + reservStartStr, module); @@ -239,7 +239,7 @@ reservEndStr += " 00:00:00.000000000"; // should have format: yyyy-mm-dd hh:mm:ss.fffffffff if (reservEndStr.length() > 0) { try { - reservEnd = java.sql.Timestamp.valueOf((String) reservEndStr); + reservEnd = java.sql.Timestamp.valueOf(reservEndStr); } catch (Exception e) { Debug.logWarning(e,"Problems parsing Reservation end string: " + reservEndStr, module); reservEnd = null; @@ -909,7 +909,7 @@ */ public static String setOrderName(HttpServletRequest request, HttpServletResponse response) { ShoppingCart cart = getCartObject(request); - String orderName = (String) request.getParameter("orderName"); + String orderName = request.getParameter("orderName"); cart.setOrderName(orderName); return "success"; } @@ -1400,11 +1400,11 @@ ShoppingCart cart = getCartObject(request); ShoppingCartHelper cartHelper = new ShoppingCartHelper(delegator, dispatcher, cart); - String agreementId = (String) request.getParameter("agreementId"); - String currencyUomId = (String) request.getParameter("currencyUomId"); - String shipBeforeDateStr = (String) request.getParameter("shipBeforeDate"); - String shipAfterDateStr = (String) request.getParameter("shipAfterDate"); - String orderName = (String) request.getParameter("orderName"); + String agreementId = request.getParameter("agreementId"); + String currencyUomId = request.getParameter("currencyUomId"); + String shipBeforeDateStr = request.getParameter("shipBeforeDate"); + String shipAfterDateStr = request.getParameter("shipAfterDate"); + String orderName = request.getParameter("orderName"); Map result = null; // set the agreement if specified otherwise set the currency Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Sat Dec 2 02:45:01 2006 @@ -620,7 +620,7 @@ // should have format: yyyy-mm-dd hh:mm:ss.fffffffff quantString += " 00:00:00.000000000"; if (item != null) { - Timestamp reservStart = Timestamp.valueOf((String) quantString); + Timestamp reservStart = Timestamp.valueOf(quantString); item.setReservStart(reservStart); } } else if (parameterName.startsWith("reservLength")) { Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Sat Dec 2 02:45:01 2006 @@ -498,8 +498,8 @@ Iterator iter = orderItems.iterator(); while (iter.hasNext()) { GenericValue orderItem = (GenericValue) iter.next(); - String shoppingListId = (String) orderItem.getString("shoppingListId"); - String shoppingListItemSeqId = (String) orderItem.getString("shoppingListItemSeqId"); + String shoppingListId = orderItem.getString("shoppingListId"); + String shoppingListItemSeqId = orderItem.getString("shoppingListItemSeqId"); if ((shoppingListId != null) && (shoppingListId.length() > 0)) { GenericValue shoppingListItem=delegator.findByPrimaryKey("ShoppingListItem", UtilMisc.toMap("shoppingListId", shoppingListId, "shoppingListItemSeqId", shoppingListItemSeqId)); Modified: incubator/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java (original) +++ incubator/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java Sat Dec 2 02:45:01 2006 @@ -258,7 +258,7 @@ while (a.hasNext()) { GenericValue partyAndAddr = (GenericValue) a.next(); String partyId = partyAndAddr.getString("partyId"); - String cmId = (String) partyAndAddr.getString("contactMechId"); + String cmId = partyAndAddr.getString("contactMechId"); if (UtilValidate.isNotEmpty(partyId)) { GenericValue p = delegator.findByPrimaryKey("Person", UtilMisc.toMap("partyId", partyId)); if (p != null) { Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original) +++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Sat Dec 2 02:45:01 2006 @@ -568,7 +568,7 @@ String orderItemSeqId = orderItem.getString("orderItemSeqId"); Timestamp shipDate = (Timestamp) backOrderedItems.get(orderItemSeqId); Timestamp cancelDate = (Timestamp) cancelItems.get(orderItemSeqId); - Timestamp currentCancelDate = (Timestamp) orderItem.getTimestamp("autoCancelDate"); + Timestamp currentCancelDate = orderItem.getTimestamp("autoCancelDate"); Debug.logError("OI: " + orderId + " SEQID: "+ orderItemSeqId + " cancelAll: " + cancelAll + " cancelDate: " + cancelDate, module); if (backOrderedItems.containsKey(orderItemSeqId)) { Modified: incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/template/FreeMarkerWorker.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/template/FreeMarkerWorker.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/template/FreeMarkerWorker.java (original) +++ incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/template/FreeMarkerWorker.java Sat Dec 2 02:45:01 2006 @@ -431,7 +431,7 @@ public static void saveContextValues(Map context, String [] saveKeyNames, Map saveMap ) { //Map saveMap = new HashMap(); for (int i=0; i<saveKeyNames.length; i++) { - String key = (String)saveKeyNames[i]; + String key = saveKeyNames[i]; Object o = context.get(key); if (o instanceof Map) o = new HashMap((Map)o); @@ -445,7 +445,7 @@ public static Map saveValues(Map context, String [] saveKeyNames) { Map saveMap = new HashMap(); for (int i=0; i<saveKeyNames.length; i++) { - String key = (String)saveKeyNames[i]; + String key = saveKeyNames[i]; Object o = context.get(key); if (o instanceof Map) o = new HashMap((Map)o); @@ -481,7 +481,7 @@ public static void removeValues(Map context, String [] removeKeyNames ) { for (int i=0; i<removeKeyNames.length; i++) { - String key = (String)removeKeyNames[i]; + String key = removeKeyNames[i]; context.remove(key); } return; Modified: incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java (original) +++ incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java Sat Dec 2 02:45:01 2006 @@ -97,7 +97,7 @@ } if (visit.getString("sessionId").equals(sessionId)) { - String currentPage = (String) request.getParameter("currentPage"); + String currentPage = request.getParameter("currentPage"); if (appletSessions.containsKey(sessionId)) { Map sessionMap = (Map) appletSessions.get(sessionId); String followers = (String) sessionMap.get("followers"); Modified: incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java (original) +++ incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java Sat Dec 2 02:45:01 2006 @@ -490,7 +490,7 @@ EntityConditionList exprList = null; if (tmpList.size() > 0) { - exprList = new EntityConditionList(tmpList, (EntityJoinOperator) EntityOperator.AND); + exprList = new EntityConditionList(tmpList, EntityOperator.AND); } List orderByList = null; Modified: incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/status/StatusServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/status/StatusServices.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/status/StatusServices.java (original) +++ incubator/ofbiz/trunk/framework/common/src/org/ofbiz/common/status/StatusServices.java Sat Dec 2 02:45:01 2006 @@ -38,7 +38,7 @@ public static final String module = StatusServices.class.getName(); public static Map getStatusItems(DispatchContext ctx, Map context) { - GenericDelegator delegator = (GenericDelegator) ctx.getDelegator(); + GenericDelegator delegator = ctx.getDelegator(); List statusTypes = (List) context.get("statusTypeIds"); if (statusTypes == null || statusTypes.size() == 0) { return ServiceUtil.returnError("Parameter statusTypeIds can not be null and must contain at least one element"); @@ -61,7 +61,7 @@ } public static Map getStatusValidChangeToDetails(DispatchContext ctx, Map context) { - GenericDelegator delegator = (GenericDelegator) ctx.getDelegator(); + GenericDelegator delegator = ctx.getDelegator(); List statusValidChangeToDetails = null; String statusId = (String) context.get("statusId"); try { Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original) +++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Sat Dec 2 02:45:01 2006 @@ -652,7 +652,7 @@ } // In case of view entity try to retrieve the field heading from the real entity linked to the view - ModelEntity modelEntityToUse = (ModelEntity) this.getModelEntity(); + ModelEntity modelEntityToUse = this.getModelEntity(); if (modelEntityToUse instanceof ModelViewEntity) { ModelViewEntity modelViewEntity = (ModelViewEntity) modelEntityToUse; Iterator it = modelViewEntity.getAliasesIterator(); Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java (original) +++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java Sat Dec 2 02:45:01 2006 @@ -147,7 +147,7 @@ if (isPK) { return entity.getModelEntity().convertToViewValues(targetEntityName, (GenericPK) entity); } else { - return entity.getModelEntity().convertToViewValues(targetEntityName, (GenericEntity) entity); + return entity.getModelEntity().convertToViewValues(targetEntityName, entity); } } Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java (original) +++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java Sat Dec 2 02:45:01 2006 @@ -111,9 +111,9 @@ // -- Protected Methods - for internal use only --// protected void setModelEntities(ModelReader modelReader) throws GenericEntityException { - firstModelEntity = (ModelEntity) modelReader.getModelEntity(firstEntity); + firstModelEntity = modelReader.getModelEntity(firstEntity); if (secondEntity != null && !secondEntity.equals("")) { - secondModelEntity = (ModelEntity) modelReader.getModelEntity(secondEntity); + secondModelEntity = modelReader.getModelEntity(secondEntity); } } Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java (original) +++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java Sat Dec 2 02:45:01 2006 @@ -49,7 +49,7 @@ protected ModelField getField(ModelEntity modelEntity, String fieldName) { ModelField modelField = null; if (modelEntity != null) { - modelField = (ModelField) modelEntity.getField(fieldName); + modelField = modelEntity.getField(fieldName); } return modelField; } @@ -64,7 +64,7 @@ if (modelField != null) { colName = modelField.getColName(); } else { - colName = (String) fieldName; + colName = fieldName; } return colName; } Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java (original) +++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java Sat Dec 2 02:45:01 2006 @@ -235,7 +235,7 @@ //make sure all keyMap 'relFieldName's match fields of // the relatedEntity for (int rkm = 0; rkm < relation.getKeyMapsSize(); rkm++) { - ModelKeyMap keyMap = (ModelKeyMap) relation.getKeyMap(rkm); + ModelKeyMap keyMap = relation.getKeyMap(rkm); ModelField field = entity.getField(keyMap.getFieldName()); ModelField rfield = null; Modified: incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java (original) +++ incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java Sat Dec 2 02:45:01 2006 @@ -159,7 +159,7 @@ private Map getResponseParams(Message respMessage) { Map mRet = new Hashtable(); try { - SOAPEnvelope resEnv = (SOAPEnvelope) respMessage.getSOAPEnvelope(); + SOAPEnvelope resEnv = respMessage.getSOAPEnvelope(); List bodies = resEnv.getBodyElements(); Iterator i = bodies.iterator(); while (i.hasNext()) { Modified: incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java (original) +++ incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java Sat Dec 2 02:45:01 2006 @@ -260,7 +260,7 @@ StringBuffer verboseMessageBuffer = new StringBuffer(); - Iterator debugIter = ((Set) thisURI.keySet()).iterator(); + Iterator debugIter = thisURI.keySet().iterator(); while (debugIter.hasNext()) { Object lo = debugIter.next(); String name = (String) lo; @@ -354,7 +354,7 @@ StringBuffer verboseMessageBuffer = new StringBuffer(); - Iterator debugIter = ((Set) thisURI.keySet()).iterator(); + Iterator debugIter = thisURI.keySet().iterator(); while (debugIter.hasNext()) { Object lo = debugIter.next(); String name = (String) lo; Modified: incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestManager.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestManager.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestManager.java (original) +++ incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestManager.java Sat Dec 2 02:45:01 2006 @@ -55,7 +55,7 @@ /** Gets the entire handler mapping */ public Map getHandlerMap() { - return (Map) ConfigXMLReader.getHandlerMap(configFileUrl); + return ConfigXMLReader.getHandlerMap(configFileUrl); } /** Gets the class name of the named handler */ Modified: incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java (original) +++ incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceMultiEventHandler.java Sat Dec 2 02:45:01 2006 @@ -196,7 +196,7 @@ Iterator modelParmInIter = modelParmInList.iterator(); while (modelParmInIter.hasNext()) { ModelParam modelParam = (ModelParam) modelParmInIter.next(); - String paramName = (String) modelParam.name; + String paramName = modelParam.name; // Debug.logInfo("In ServiceMultiEventHandler processing input parameter [" + modelParam.name + (modelParam.optional?"(optional):":"(required):") + modelParam.mode + "] for service [" + serviceName + "]", module); Modified: incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java (original) +++ incubator/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java Sat Dec 2 02:45:01 2006 @@ -496,7 +496,7 @@ /** return the hits per minute using the entire length of the bin as returned by getBinLengthMinutes() */ public double getHitsPerMinute() { - return ((double) this.numberHits) / ((double) this.getBinLengthMinutes()); + return ((double) this.numberHits) / this.getBinLengthMinutes(); } synchronized void addHit(long startTime, long runningTime) { Modified: incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?view=diff&rev=481546&r1=481545&r2=481546 ============================================================================== --- incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original) +++ incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Sat Dec 2 02:45:01 2006 @@ -753,7 +753,7 @@ if (cart != null) { int paymentInfoSize = cart.selectedPayments(); for (int i = 0; i < paymentInfoSize; i++) { - ShoppingCart.CartPaymentInfo inf = (ShoppingCart.CartPaymentInfo) cart.getPaymentInfo(i); + ShoppingCart.CartPaymentInfo inf = cart.getPaymentInfo(i); GenericValue paymentInfoObj = inf.getValueObject(session.getDelegator()); GenericValue paymentMethodType = null; |
Free forum by Nabble | Edit this page |