You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2010/12/12 22:31:31 UTC
svn commit: r1044931 [1/4] - in /ofbiz/trunk:
applications/accounting/src/org/ofbiz/accounting/invoice/
applications/accounting/src/org/ofbiz/accounting/payment/
applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/
applications/...
Author: lektran
Date: Sun Dec 12 21:31:27 2010
New Revision: 1044931
URL: http://svn.apache.org/viewvc?rev=1044931&view=rev
Log:
Remove unnecessary casts
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/InventoryEventPlannedServices.java
ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskEvents.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java
ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
ofbiz/trunk/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalConverter.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/json/JSONWriter.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/json/test/JSONTests.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilNumber.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilObject.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilTimer.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/IndentingWriterTests.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonEvents.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java
ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java
ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java
ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java
ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiSession.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/StringAppend.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/ifops/CheckPermission.java
ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/otherops/Calculate.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupModel.java
ofbiz/trunk/framework/service/src/org/ofbiz/service/semaphore/ServiceSemaphore.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ProtectViewWorker.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/WfsEventHandler.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/region/RegionManager.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlTreeRenderer.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenViewHandler.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenFactory.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeFactory.java
ofbiz/trunk/specialpurpose/assetmaint/src/org/ofbiz/assetmaint/FixedAssetMaintServices.java
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayHelper.java
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java
ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java
ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java
ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreCategoryFacade.java
ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreHelper.java
ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOptions.java
ofbiz/trunk/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreOrder.java
ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java
ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java
ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/adaptor/KeyboardAdaptor.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Input.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PosButton.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/PosButtonWrapper.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/DeviceLoader.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/KeyboardService.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/MsrKybService.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/jpos/service/ScannerKybService.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosScreen.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/WfApplicationServices.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/WfFactory.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/WfUtil.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/client/WorkflowClient.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/ServiceCondition.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityImpl.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfActivityToolImplementation.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfAssignmentImpl.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfProcessImpl.java
ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/impl/WfRequesterImpl.java
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java Sun Dec 12 21:31:27 2010
@@ -511,7 +511,7 @@ public class InvoiceWorker {
// check if the invoice is posted and get the conversion from there
List<GenericValue> acctgTransEntries = invoice.getRelated("AcctgTrans");
if (UtilValidate.isNotEmpty(acctgTransEntries)) {
- GenericValue acctgTransEntry = ((GenericValue) acctgTransEntries.get(0)).getRelated("AcctgTransEntry").get(0);
+ GenericValue acctgTransEntry = (acctgTransEntries.get(0)).getRelated("AcctgTransEntry").get(0);
conversionRate = acctgTransEntry.getBigDecimal("amount").divide(acctgTransEntry.getBigDecimal("origAmount"), new MathContext(100)).setScale(decimals,rounding);
}
// check if a payment is applied and use the currency conversion from there
@@ -532,7 +532,7 @@ public class InvoiceWorker {
if (UtilValidate.isEmpty(conversionRate)) {
List<GenericValue> rates = EntityUtil.filterByDate(delegator.findByAnd("UomConversionDated", UtilMisc.toMap("uomIdTo", invoice.getString("currencyUomId"), "uomId", otherCurrencyUomId)), invoice.getTimestamp("invoiceDate"));
if (UtilValidate.isNotEmpty(rates)) {
- conversionRate = (BigDecimal.ONE).divide(((GenericValue) rates.get(0)).getBigDecimal("conversionFactor"), new MathContext(100)).setScale(decimals,rounding);
+ conversionRate = (BigDecimal.ONE).divide((rates.get(0)).getBigDecimal("conversionFactor"), new MathContext(100)).setScale(decimals,rounding);
} else {
Debug.logError("Could not find conversionrate for invoice: " + invoice.getString("invoiceId"), module);
return new BigDecimal("1");
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Sun Dec 12 21:31:27 2010
@@ -221,7 +221,7 @@ public class PaymentGatewayServices {
if (UtilValidate.isNotEmpty(otherPaymentMethodAndCreditCardList)) {
Iterator<GenericValue> otherPaymentMethodAndCreditCardIter = otherPaymentMethodAndCreditCardList.iterator();
while (otherPaymentMethodAndCreditCardIter.hasNext()) {
- GenericValue otherPaymentMethodAndCreditCard = (GenericValue) otherPaymentMethodAndCreditCardIter.next();
+ GenericValue otherPaymentMethodAndCreditCard = otherPaymentMethodAndCreditCardIter.next();
// change OrderPaymentPreference in memory only and call auth service
orderPaymentPreference.set("paymentMethodId", otherPaymentMethodAndCreditCard.getString("paymentMethodId"));
@@ -348,7 +348,7 @@ public class PaymentGatewayServices {
List<String> messages = FastList.newInstance();
Iterator<GenericValue> payments = paymentPrefs.iterator();
while (payments.hasNext()) {
- GenericValue paymentPref = (GenericValue) payments.next();
+ GenericValue paymentPref = payments.next();
if (reAuth && "PAYMENT_AUTHORIZED".equals(paymentPref.getString("statusId"))) {
String paymentConfig = null;
// get the payment settings i.e. serviceName and config properties file name
@@ -524,7 +524,7 @@ public class PaymentGatewayServices {
}
// try other expire dates if the expireDate is not after today, or if we called the auth service and resultBadExpire = true
- if (tryOtherExpDates && (!UtilValidate.isDateAfterToday(creditCard.getString("expireDate")) || (processorResult != null && Boolean.TRUE.equals((Boolean) processorResult.get("resultBadExpire"))))) {
+ if (tryOtherExpDates && (!UtilValidate.isDateAfterToday(creditCard.getString("expireDate")) || (processorResult != null && Boolean.TRUE.equals(processorResult.get("resultBadExpire"))))) {
// try adding 2, 3, 4 years later with the same month
String expireDate = creditCard.getString("expireDate");
int dateSlash1 = expireDate.indexOf("/");
@@ -539,14 +539,14 @@ public class PaymentGatewayServices {
processorResult = dispatcher.runSync(serviceName, processContext, TX_TIME, true);
// note that these additional tries will only be done if the service return is not an error, in that case we let it pass through to the normal error handling
- if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals((Boolean) processorResult.get("resultBadExpire"))) {
+ if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals(processorResult.get("resultBadExpire"))) {
// okay, try one more year...
year = StringUtil.addToNumberString(year, 1);
creditCard.set("expireDate", month + "/" + year);
processorResult = dispatcher.runSync(serviceName, processContext, TX_TIME, true);
}
- if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals((Boolean) processorResult.get("resultBadExpire"))) {
+ if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals(processorResult.get("resultBadExpire"))) {
// okay, try one more year... and this is the last try
year = StringUtil.addToNumberString(year, 1);
creditCard.set("expireDate", month + "/" + year);
@@ -554,7 +554,7 @@ public class PaymentGatewayServices {
}
// at this point if we have a successful result, let's save the new creditCard expireDate
- if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals((Boolean) processorResult.get("authResult"))) {
+ if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals(processorResult.get("authResult"))) {
// TODO: this is bad; we should be expiring the old card and creating a new one instead of editing it
creditCard.store();
}
@@ -662,7 +662,7 @@ public class PaymentGatewayServices {
Collection<GenericValue> emails = ContactHelper.getContactMech(billToPersonOrGroup.getRelatedOne("Party"), "PRIMARY_EMAIL", "EMAIL_ADDRESS", false);
if (UtilValidate.isNotEmpty(emails)) {
- billToEmail = (GenericValue) emails.iterator().next();
+ billToEmail = emails.iterator().next();
}
toContext.put("billToParty", billToPersonOrGroup);
@@ -733,7 +733,7 @@ public class PaymentGatewayServices {
List<GenericValue> finished = FastList.newInstance();
Iterator<GenericValue> payments = paymentPrefs.iterator();
while (payments.hasNext()) {
- paymentPref = (GenericValue) payments.next();
+ paymentPref = payments.next();
Map<String, Object> releaseContext = UtilMisc.toMap("userLogin", userLogin, "orderPaymentPreferenceId", paymentPref.getString("orderPaymentPreferenceId"));
Map<String, Object> releaseResult = null;
try {
@@ -794,7 +794,7 @@ public class PaymentGatewayServices {
while (i.hasNext()) {
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
- String message = (String) i.next();
+ String message = i.next();
respMsg.set("paymentGatewayRespMsgId", respMsgId);
respMsg.set("paymentGatewayResponseId", responseId);
respMsg.set("pgrMessage", message);
@@ -819,7 +819,7 @@ public class PaymentGatewayServices {
if (paymentList != null) {
Iterator<GenericValue> pi = paymentList.iterator();
while (pi.hasNext()) {
- GenericValue pay = (GenericValue) pi.next();
+ GenericValue pay = pi.next();
try {
Map<String, Object> cancelResults = dispatcher.runSync("setPaymentStatus", UtilMisc.toMap("userLogin", userLogin, "paymentId", pay.get("paymentId"), "statusId", "PMNT_CANCELLED"));
if (ServiceUtil.isError(cancelResults)) {
@@ -985,7 +985,7 @@ public class PaymentGatewayServices {
while (i.hasNext()) {
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
- String message = (String) i.next();
+ String message = i.next();
respMsg.set("paymentGatewayRespMsgId", respMsgId);
respMsg.set("paymentGatewayResponseId", responseId);
respMsg.set("pgrMessage", message);
@@ -1011,7 +1011,7 @@ public class PaymentGatewayServices {
if (paymentList != null) {
Iterator<GenericValue> pi = paymentList.iterator();
while (pi.hasNext()) {
- GenericValue pay = (GenericValue) pi.next();
+ GenericValue pay = pi.next();
try {
Map<String, Object> cancelResults = dispatcher.runSync("setPaymentStatus", UtilMisc.toMap("userLogin", userLogin, "paymentId", pay.get("paymentId"), "statusId", "PMNT_CANCELLED"));
if (ServiceUtil.isError(cancelResults)) {
@@ -1072,7 +1072,7 @@ public class PaymentGatewayServices {
if (orderItemBillings != null) {
Iterator<GenericValue> oii = orderItemBillings.iterator();
while (oii.hasNext()) {
- GenericValue oib = (GenericValue) oii.next();
+ GenericValue oib = oii.next();
String orderId = oib.getString("orderId");
if (testOrderId == null) {
testOrderId = orderId;
@@ -1169,7 +1169,7 @@ public class PaymentGatewayServices {
if (UtilValidate.isNotEmpty(paymentPrefsBa)) {
Iterator<GenericValue> paymentsBa = paymentPrefsBa.iterator();
while (paymentsBa.hasNext()) {
- GenericValue paymentPref = (GenericValue) paymentsBa.next();
+ GenericValue paymentPref = paymentsBa.next();
BigDecimal authAmount = paymentPref.getBigDecimal("maxAmount");
if (authAmount == null) authAmount = ZERO;
@@ -1539,7 +1539,7 @@ public class PaymentGatewayServices {
// we have captured all the amount required
break;
}
- GenericValue paymentApplication = (GenericValue)paymentApplicationsIt.next();
+ GenericValue paymentApplication = paymentApplicationsIt.next();
GenericValue payment = paymentApplication.getRelatedOne("Payment");
if (payment.getString("paymentPreferenceId") != null) {
// if the payment is reserved for a specific OrderPaymentPreference,
@@ -1866,10 +1866,10 @@ public class PaymentGatewayServices {
response.set("gatewayMessage", context.get("authMessage"));
response.set("transactionDate", UtilDateTime.nowTimestamp());
- if (Boolean.TRUE.equals((Boolean) context.get("resultDeclined"))) response.set("resultDeclined", "Y");
- if (Boolean.TRUE.equals((Boolean) context.get("resultNsf"))) response.set("resultNsf", "Y");
- if (Boolean.TRUE.equals((Boolean) context.get("resultBadExpire"))) response.set("resultBadExpire", "Y");
- if (Boolean.TRUE.equals((Boolean) context.get("resultBadCardNumber"))) response.set("resultBadCardNumber", "Y");
+ if (Boolean.TRUE.equals(context.get("resultDeclined"))) response.set("resultDeclined", "Y");
+ if (Boolean.TRUE.equals(context.get("resultNsf"))) response.set("resultNsf", "Y");
+ if (Boolean.TRUE.equals(context.get("resultBadExpire"))) response.set("resultBadExpire", "Y");
+ if (Boolean.TRUE.equals(context.get("resultBadCardNumber"))) response.set("resultBadCardNumber", "Y");
// save the response
savePgr(dctx, response);
@@ -1881,7 +1881,7 @@ public class PaymentGatewayServices {
while (i.hasNext()) {
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
- String message = (String) i.next();
+ String message = i.next();
respMsg.set("paymentGatewayRespMsgId", respMsgId);
respMsg.set("paymentGatewayResponseId", responseId);
respMsg.set("pgrMessage", message);
@@ -1926,7 +1926,7 @@ public class PaymentGatewayServices {
}
creditCard.set("lastFailedAuthDate", nowTimestamp);
- if (Boolean.TRUE.equals((Boolean) context.get("resultNsf"))) {
+ if (Boolean.TRUE.equals(context.get("resultNsf"))) {
Long consecutiveFailedNsf = creditCard.getLong("consecutiveFailedNsf");
if (consecutiveFailedNsf == null) {
creditCard.set("consecutiveFailedNsf", Long.valueOf(1));
@@ -1960,7 +1960,7 @@ public class PaymentGatewayServices {
private static boolean needsNsfRetry(GenericValue orderPaymentPreference, Map<String, ? extends Object> processContext, Delegator delegator) throws GenericEntityException {
boolean needsNsfRetry = false;
- if (Boolean.TRUE.equals((Boolean) processContext.get("resultNsf"))) {
+ if (Boolean.TRUE.equals(processContext.get("resultNsf"))) {
// only track this for auto-orders, since we will only not fail and re-try on those
GenericValue orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader");
if (UtilValidate.isNotEmpty(orderHeader.getString("autoOrderShoppingListId"))) {
@@ -2190,7 +2190,7 @@ public class PaymentGatewayServices {
while (i.hasNext()) {
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
- String message = (String) i.next();
+ String message = i.next();
respMsg.set("paymentGatewayRespMsgId", respMsgId);
respMsg.set("paymentGatewayResponseId", responseId);
respMsg.set("pgrMessage", message);
@@ -2469,7 +2469,7 @@ public class PaymentGatewayServices {
while (i.hasNext()) {
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
- String message = (String) i.next();
+ String message = i.next();
respMsg.set("paymentGatewayRespMsgId", respMsgId);
respMsg.set("paymentGatewayResponseId", responseId);
respMsg.set("pgrMessage", message);
@@ -2613,7 +2613,7 @@ public class PaymentGatewayServices {
if (eli != null) {
Debug.logInfo("Processing failed order re-auth(s)", module);
GenericValue value = null;
- while (((value = (GenericValue) eli.next()) != null)) {
+ while (((value = eli.next()) != null)) {
String orderId = value.getString("orderId");
if (!processList.contains(orderId)) { // just try each order once
try {
@@ -2662,7 +2662,7 @@ public class PaymentGatewayServices {
if (eli != null) {
Debug.logInfo("Processing failed order re-auth(s)", module);
GenericValue value = null;
- while (((value = (GenericValue) eli.next()) != null)) {
+ while (((value = eli.next()) != null)) {
String orderId = value.getString("orderId");
if (!processList.contains(orderId)) { // just try each order once
try {
@@ -3382,7 +3382,7 @@ public class PaymentGatewayServices {
String lastNumberStr = expireDate.substring(expireDate.length() - 1);
int lastNumber = Integer.parseInt(lastNumberStr);
- if ((float) lastNumber / 2.0 == 0.0) {
+ if (lastNumber / 2.0 == 0.0) {
return alwaysBadExpireProcessor(dctx, context);
} else {
return alwaysApproveProcessor(dctx, context);
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Sun Dec 12 21:31:27 2010
@@ -125,7 +125,7 @@ public class AIMPaymentServices {
// CAPTURE_ONLY is a "force" transaction to be used if there is no prior authorization
props.put("transType", "PRIOR_AUTH_CAPTURE");
//props.put("transType","CAPTURE_ONLY");
- props.put("cardtype", (String)creditCard.get("cardType"));
+ props.put("cardtype", creditCard.get("cardType"));
buildCaptureTransaction(context,props,request);
Map<String, Object> validateResults = validateRequest(context, props, request);
String respMsg = (String)validateResults.get(ModelService.RESPONSE_MESSAGE);
@@ -165,7 +165,7 @@ public class AIMPaymentServices {
buildGatewayResponeConfig(context, props, request);
buildEmailSettings(context, props, request);
props.put("transType", "CREDIT");
- props.put("cardtype", (String)creditCard.get("cardType"));
+ props.put("cardtype", creditCard.get("cardType"));
buildRefundTransaction(context, props, request);
Map<String, Object> validateResults = validateRequest(context, props, request);
String respMsg = (String)validateResults.get(ModelService.RESPONSE_MESSAGE);
@@ -398,7 +398,7 @@ public class AIMPaymentServices {
props.put("password", password);
props.put("trankey", tranKey);
if (cc != null) {
- props.put("cardtype", (String)cc.get("cardType"));
+ props.put("cardtype", cc.get("cardType"));
}
if (AIMProperties == null) {
AIMProperties = props;
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java Sun Dec 12 21:31:27 2010
@@ -250,7 +250,7 @@ public class PayPalEvents {
Set <String> keySet = parametersMap.keySet();
Iterator <String> i = keySet.iterator();
while (i.hasNext()) {
- String name = (String) i.next();
+ String name = i.next();
String value = request.getParameter(name);
Debug.logError("### Param: " + name + " => " + value, module);
if (UtilValidate.isNotEmpty(name) && "payer_status".equalsIgnoreCase(name) &&
@@ -419,7 +419,7 @@ public class PayPalEvents {
if (paymentPrefs.size() > 0) {
Iterator <GenericValue> i = paymentPrefs.iterator();
while (i.hasNext()) {
- GenericValue pref = (GenericValue) i.next();
+ GenericValue pref = i.next();
boolean okay = setPaymentPreference(dispatcher, userLogin, pref, request);
if (!okay)
return false;
@@ -504,7 +504,7 @@ public class PayPalEvents {
if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
- request.setAttribute("_ERROR_MESSAGE_", (String) results.get(ModelService.ERROR_MESSAGE));
+ request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
return false;
}
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sun Dec 12 21:31:27 2010
@@ -437,19 +437,19 @@ public class ContentWorker implements or
List<GenericValue> topicList = content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "TOPIC"));
List<String> topics = FastList.newInstance();
for (int i = 0; i < topicList.size(); i++) {
- GenericValue assoc = (GenericValue) topicList.get(i);
+ GenericValue assoc = topicList.get(i);
topics.add(assoc.getString("contentId"));
}
List<GenericValue> keywordList = content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "KEYWORD"));
List<String> keywords = FastList.newInstance();
for (int i = 0; i < keywordList.size(); i++) {
- GenericValue assoc = (GenericValue) keywordList.get(i);
+ GenericValue assoc = keywordList.get(i);
keywords.add(assoc.getString("contentId"));
}
List<GenericValue> purposeValueList = content.getRelatedCache("ContentPurpose");
List<String> purposes = FastList.newInstance();
for (int i = 0; i < purposeValueList.size(); i++) {
- GenericValue purposeValue = (GenericValue) purposeValueList.get(i);
+ GenericValue purposeValue = purposeValueList.get(i);
purposes.add(purposeValue.getString("contentPurposeTypeId"));
}
List<GenericValue> contentTypeAncestry = FastList.newInstance();
@@ -490,7 +490,7 @@ public class ContentWorker implements or
Map<String, Object> assocContext = FastMap.newInstance();
assocContext.put("related", relatedAssocs);
while (it.hasNext()) {
- GenericValue assocValue = (GenericValue) it.next();
+ GenericValue assocValue = it.next();
contentAssocTypeId = (String) assocValue.get("contentAssocTypeId");
assocContext.put("contentAssocTypeId", contentAssocTypeId);
//assocContext.put("contentTypeId", assocValue.get("contentTypeId"));
@@ -530,7 +530,7 @@ public class ContentWorker implements or
return false;
}
- Map<String, Object> currentNode = (Map<String, Object>)nodeTrail.get(sz - 1);
+ Map<String, Object> currentNode = nodeTrail.get(sz - 1);
Boolean isReturnAfter = (Boolean)currentNode.get("isReturnAfter");
if (isReturnAfter != null && isReturnAfter.booleanValue()) {
return false;
@@ -540,7 +540,7 @@ public class ContentWorker implements or
if (UtilValidate.isNotEmpty(kids)) {
int idx = 0;
while (idx < kids.size()) {
- currentNode = (Map<String, Object>)kids.get(idx);
+ currentNode = kids.get(idx);
ContentWorker.traceNodeTrail("12",nodeTrail);
Boolean isPick = (Boolean)currentNode.get("isPick");
@@ -568,9 +568,9 @@ public class ContentWorker implements or
if (!inProgress) {
// look for next sibling
while (sz > 1) {
- currentNode = (Map<String, Object>)nodeTrail.remove(--sz);
+ currentNode = nodeTrail.remove(--sz);
ContentWorker.traceNodeTrail("15",nodeTrail);
- Map<String, Object> parentNode = (Map<String, Object>) nodeTrail.get(sz - 1);
+ Map<String, Object> parentNode = nodeTrail.get(sz - 1);
kids = (List<Map <String, Object>>)parentNode.get("kids");
if (kids == null) {
continue;
@@ -578,7 +578,7 @@ public class ContentWorker implements or
int idx = kids.indexOf(currentNode);
while (idx < (kids.size() - 1)) {
- currentNode = (Map<String, Object>)kids.get(idx + 1);
+ currentNode = kids.get(idx + 1);
Boolean isFollow = (Boolean)currentNode.get("isFollow");
if (isFollow == null || !isFollow.booleanValue()) {
idx++;
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java Sun Dec 12 21:31:27 2010
@@ -117,10 +117,10 @@ public class LimitedSubContentCacheTrans
}
Map whenMap = FastMap.newInstance();
- whenMap.put("followWhen", (String) templateRoot.get("followWhen"));
- whenMap.put("pickWhen", (String) templateRoot.get("pickWhen"));
- whenMap.put("returnBeforePickWhen", (String) templateRoot.get("returnBeforePickWhen"));
- whenMap.put("returnAfterPickWhen", (String) templateRoot.get("returnAfterPickWhen"));
+ whenMap.put("followWhen", templateRoot.get("followWhen"));
+ whenMap.put("pickWhen", templateRoot.get("pickWhen"));
+ whenMap.put("returnBeforePickWhen", templateRoot.get("returnBeforePickWhen"));
+ whenMap.put("returnAfterPickWhen", templateRoot.get("returnAfterPickWhen"));
templateRoot.put("whenMap", whenMap);
String fromDateStr = (String) templateRoot.get("fromDateStr");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java Sun Dec 12 21:31:27 2010
@@ -223,7 +223,7 @@ public class RenderContentAsText impleme
}
out.write("<a href=\"");
- ServletContext servletContext = (ServletContext) request.getSession().getServletContext();
+ ServletContext servletContext = request.getSession().getServletContext();
RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
out.write("\">Edit</a>");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java Sun Dec 12 21:31:27 2010
@@ -138,7 +138,7 @@ public class RenderContentTransform impl
}
out.write("<a href=\"");
- ServletContext servletContext = (ServletContext) request.getSession().getServletContext();
+ ServletContext servletContext = request.getSession().getServletContext();
RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
out.write("\">Edit</a>");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java Sun Dec 12 21:31:27 2010
@@ -268,7 +268,7 @@ public class RenderSubContentCacheTransf
if (Debug.infoOn()) Debug.logInfo("in Render(2), contentIdTo ." + contentIdTo , module);
out.write("<a href=\"");
- ServletContext servletContext = (ServletContext) request.getSession().getServletContext();
+ ServletContext servletContext = request.getSession().getServletContext();
RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
out.write("\">Edit</a>");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java Sun Dec 12 21:31:27 2010
@@ -117,10 +117,10 @@ public class TraverseSubContentCacheTran
final Map traverseContext = FastMap.newInstance();
traverseContext.put("delegator", delegator);
Map whenMap = FastMap.newInstance();
- whenMap.put("followWhen", (String)templateRoot.get("followWhen"));
- whenMap.put("pickWhen", (String)templateRoot.get("pickWhen"));
- whenMap.put("returnBeforePickWhen", (String)templateRoot.get("returnBeforePickWhen"));
- whenMap.put("returnAfterPickWhen", (String)templateRoot.get("returnAfterPickWhen"));
+ whenMap.put("followWhen", templateRoot.get("followWhen"));
+ whenMap.put("pickWhen", templateRoot.get("pickWhen"));
+ whenMap.put("returnBeforePickWhen", templateRoot.get("returnBeforePickWhen"));
+ whenMap.put("returnAfterPickWhen", templateRoot.get("returnAfterPickWhen"));
traverseContext.put("whenMap", whenMap);
env.setVariable("whenMap", FreeMarkerWorker.autoWrap(whenMap, env));
String fromDateStr = (String)templateRoot.get("fromDateStr");
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java Sun Dec 12 21:31:27 2010
@@ -136,10 +136,10 @@ public class TraverseSubContentTransform
final Map traverseContext = FastMap.newInstance();
traverseContext.put("delegator", delegator);
Map whenMap = FastMap.newInstance();
- whenMap.put("followWhen", (String)templateCtx.get("followWhen"));
- whenMap.put("pickWhen", (String)templateCtx.get("pickWhen"));
- whenMap.put("returnBeforePickWhen", (String)templateCtx.get("returnBeforePickWhen"));
- whenMap.put("returnAfterPickWhen", (String)templateCtx.get("returnAfterPickWhen"));
+ whenMap.put("followWhen", templateCtx.get("followWhen"));
+ whenMap.put("pickWhen", templateCtx.get("pickWhen"));
+ whenMap.put("returnBeforePickWhen", templateCtx.get("returnBeforePickWhen"));
+ whenMap.put("returnAfterPickWhen", templateCtx.get("returnAfterPickWhen"));
traverseContext.put("whenMap", whenMap);
String fromDateStr = (String)templateCtx.get("fromDateStr");
String thruDateStr = (String)templateCtx.get("thruDateStr");
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/InventoryEventPlannedServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/InventoryEventPlannedServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/InventoryEventPlannedServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/InventoryEventPlannedServices.java Sun Dec 12 21:31:27 2010
@@ -72,7 +72,7 @@ public class InventoryEventPlannedServic
mrpEvent.put("isLate", (isLate? "Y": "N"));
mrpEvent.create();
} else {
- BigDecimal qties = newQuantity.add((BigDecimal)mrpEvent.getBigDecimal("quantity"));
+ BigDecimal qties = newQuantity.add(mrpEvent.getBigDecimal("quantity"));
mrpEvent.put("quantity", qties.doubleValue());
if (!UtilValidate.isEmpty(eventName)) {
String existingEventName = mrpEvent.getString("eventName");
Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Sun Dec 12 21:31:27 2010
@@ -72,8 +72,8 @@ public class VCard {
public static final String module = VCard.class.getName();
public static Map<String, Object> importVCard(DispatchContext dctx, Map<String, ? extends Object> context) {
- LocalDispatcher dispatcher = (LocalDispatcher) dctx.getDispatcher();
- Delegator delegator = (Delegator) dctx.getDelegator();
+ LocalDispatcher dispatcher = dctx.getDispatcher();
+ Delegator delegator = dctx.getDelegator();
Map<String, Object> result = ServiceUtil.returnSuccess();
Address workAddress = null;
String email = null;
@@ -213,7 +213,7 @@ public class VCard {
}
public static Map<String, Object> exportVCard(DispatchContext dctx, Map<String, ? extends Object> context) {
- Delegator delegator = (Delegator) dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String partyId = (String) context.get("partyId");
File file = null;
try {
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java Sun Dec 12 21:31:27 2010
@@ -104,7 +104,7 @@ public class OrderManagerEvents {
if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
- request.setAttribute("_ERROR_MESSAGE_", (String) results.get(ModelService.ERROR_MESSAGE));
+ request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
return "error";
}
}
@@ -229,7 +229,7 @@ public class OrderManagerEvents {
if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
- request.setAttribute("_ERROR_MESSAGE_", (String) results.get(ModelService.ERROR_MESSAGE));
+ request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
return "error";
}
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Sun Dec 12 21:31:27 2010
@@ -81,7 +81,7 @@ public class FinAccountHelper {
*/
public static BigDecimal addFirstEntryAmount(BigDecimal initialValue, List<GenericValue> transactions, String fieldName, int decimals, int rounding) throws GenericEntityException {
if ((transactions != null) && (transactions.size() == 1)) {
- GenericValue firstEntry = (GenericValue) transactions.get(0);
+ GenericValue firstEntry = transactions.get(0);
if (firstEntry.get(fieldName) != null) {
BigDecimal valueToAdd = firstEntry.getBigDecimal(fieldName);
return initialValue.add(valueToAdd).setScale(decimals, rounding);
@@ -163,7 +163,7 @@ public class FinAccountHelper {
Debug.logError("Multiple fin accounts found", module);
return null;
} else {
- return (GenericValue) accounts.get(0);
+ return accounts.get(0);
}
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Sun Dec 12 21:31:27 2010
@@ -278,8 +278,8 @@ public class OrderLookupServices {
// Shipment Method
String shipmentMethod = (String) context.get("shipmentMethod");
if (UtilValidate.isNotEmpty(shipmentMethod)) {
- String carrierPartyId = (String) shipmentMethod.substring(0, shipmentMethod.indexOf("@"));
- String ShippingMethodTypeId = (String) shipmentMethod.substring(shipmentMethod.indexOf("@")+1);
+ String carrierPartyId = shipmentMethod.substring(0, shipmentMethod.indexOf("@"));
+ String ShippingMethodTypeId = shipmentMethod.substring(shipmentMethod.indexOf("@")+1);
dve.addMemberEntity("OISG", "OrderItemShipGroup");
dve.addAlias("OISG", "shipmentMethodTypeId");
dve.addAlias("OISG", "carrierPartyId");
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sun Dec 12 21:31:27 2010
@@ -260,7 +260,7 @@ public class OrderReturnServices {
String xslfoAttachScreenLocation = productStoreEmail.getString("xslfoAttachScreenLocation");
sendMap.put("xslfoAttachScreenLocation", xslfoAttachScreenLocation);
- ResourceBundleMapWrapper uiLabelMap = (ResourceBundleMapWrapper) UtilProperties.getResourceBundleMap("EcommerceUiLabels", locale);
+ ResourceBundleMapWrapper uiLabelMap = UtilProperties.getResourceBundleMap("EcommerceUiLabels", locale);
uiLabelMap.addBottomResourceBundle("OrderUiLabels");
uiLabelMap.addBottomResourceBundle("CommonUiLabels");
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Sun Dec 12 21:31:27 2010
@@ -357,7 +357,7 @@ public class OrderServices {
if (ServiceUtil.isError(invReqResult)) {
errorMessages.add(invReqResult.get(ModelService.ERROR_MESSAGE));
errorMessages.addAll((List) invReqResult.get(ModelService.ERROR_MESSAGE_LIST));
- } else if (!"Y".equals((String) invReqResult.get("availableOrNotRequired"))) {
+ } else if (!"Y".equals(invReqResult.get("availableOrNotRequired"))) {
String invErrMsg = UtilProperties.getMessage(resource_error, "product.out_of_stock",
new Object[] { getProductName(product, itemName), currentProductId }, locale);
Debug.logWarning(invErrMsg, module);
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java Sun Dec 12 21:31:27 2010
@@ -107,7 +107,7 @@ public class RequirementServices {
// get an available supplier product, preferably the one with the smallest minimum quantity to order, followed by price
String supplierKey = partyId + "^" + productId;
- GenericValue supplierProduct = (GenericValue) suppliers.get(supplierKey);
+ GenericValue supplierProduct = suppliers.get(supplierKey);
if (supplierProduct == null) {
conditions = UtilMisc.toList(
// TODO: it is possible to restrict to quantity > minimumOrderQuantity, but then the entire requirement must be skipped
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java Sun Dec 12 21:31:27 2010
@@ -637,7 +637,7 @@ public class CheckOutEvents {
Delegator delegator = (Delegator) request.getAttribute("delegator");
ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
GenericValue productStore = ProductStoreWorker.getProductStore(cart.getProductStoreId(), delegator);
- String paymentMethodTypeId = (String) request.getParameter("paymentMethodTypeId");
+ String paymentMethodTypeId = request.getParameter("paymentMethodTypeId");
if ("EXT_PAYPAL".equals(paymentMethodTypeId) || cart.getPaymentMethodTypeIds().contains("EXT_PAYPAL")) {
List<GenericValue> payPalProdStorePaySettings = null;
try {
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sun Dec 12 21:31:27 2010
@@ -498,7 +498,7 @@ public class ShoppingCart implements Ite
GenericValue supplierProduct = null;
// Check for existing cart item.
for (int i = 0; i < this.cartLines.size(); i++) {
- ShoppingCartItem sci = (ShoppingCartItem) cartLines.get(i);
+ ShoppingCartItem sci = cartLines.get(i);
if (sci.equals(productId, reservStart, reservLength, reservPersons, accommodationMapId, accommodationSpotId, features, attributes, prodCatalogId,selectedAmount, configWrapper, itemType, itemGroup, false)) {
@@ -651,7 +651,7 @@ public class ShoppingCart implements Ite
public ShoppingCartItem findCartItem(String productId, Map features, Map attributes, String prodCatalogId, BigDecimal selectedAmount) {
// Check for existing cart item.
for (int i = 0; i < this.cartLines.size(); i++) {
- ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
+ ShoppingCartItem cartItem = cartLines.get(i);
if (cartItem.equals(productId, features, attributes, prodCatalogId, selectedAmount)) {
return cartItem;
@@ -713,7 +713,7 @@ public class ShoppingCart implements Ite
public void removeEmptyCartItems() {
// Check for existing cart item.
for (int i = 0; i < this.cartLines.size();) {
- ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
+ ShoppingCartItem cartItem = cartLines.get(i);
if (cartItem.getQuantity().compareTo(BigDecimal.ZERO) == 0) {
this.clearItemShipInfo(cartItem);
@@ -806,7 +806,7 @@ public class ShoppingCart implements Ite
public boolean containAnyWorkEffortCartItems() {
// Check for existing cart item.
for (int i = 0; i < this.cartLines.size(); i++) {
- ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
+ ShoppingCartItem cartItem = cartLines.get(i);
if (cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) { // create workeffort items?
return true;
}
@@ -817,7 +817,7 @@ public class ShoppingCart implements Ite
public boolean containAllWorkEffortCartItems() {
// Check for existing cart item.
for (int i = 0; i < this.cartLines.size(); i++) {
- ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
+ ShoppingCartItem cartItem = cartLines.get(i);
if (!cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) { // not a item to create workefforts?
return false;
}
@@ -831,7 +831,7 @@ public class ShoppingCart implements Ite
*/
public boolean containOnlyDigitalGoods() {
for (int i = 0; i < this.cartLines.size(); i++) {
- ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
+ ShoppingCartItem cartItem = cartLines.get(i);
GenericValue product = cartItem.getProduct();
try {
GenericValue productType = product.getRelatedOneCache("ProductType");
@@ -879,14 +879,14 @@ public class ShoppingCart implements Ite
if (cartLines.size() <= index) {
return null;
}
- return (ShoppingCartItem) cartLines.get(index);
+ return cartLines.get(index);
}
public ShoppingCartItem findCartItem(String orderItemSeqId) {
if (orderItemSeqId != null) {
for (int i = 0; i < this.cartLines.size(); i++) {
- ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
+ ShoppingCartItem cartItem = cartLines.get(i);
String itemSeqId = cartItem.getOrderItemSeqId();
if (itemSeqId != null && orderItemSeqId.equals(itemSeqId)) {
return cartItem;
@@ -908,7 +908,7 @@ public class ShoppingCart implements Ite
}
if (index < 0) return;
if (cartLines.size() <= index) return;
- ShoppingCartItem item = (ShoppingCartItem) cartLines.remove(index);
+ ShoppingCartItem item = cartLines.remove(index);
// set quantity to 0 to trigger necessary events
item.setQuantity(BigDecimal.ZERO, dispatcher, this);
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Sun Dec 12 21:31:27 2010
@@ -504,7 +504,7 @@ public class ShoppingCartHelper {
try {
if (Debug.verboseOn()) Debug.logVerbose("Bulk Adding to cart requirement [" + quantity + "] of [" + productId + "]", module);
int index = this.cart.addOrIncreaseItem(productId, null, quantity, null, null, null, requirement.getTimestamp("requiredByDate"), null, null, null, catalogId, null, null, itemGroupNumber, null, dispatcher);
- ShoppingCartItem sci = (ShoppingCartItem)this.cart.items().get(index);
+ ShoppingCartItem sci = this.cart.items().get(index);
sci.setRequirementId(requirementId);
} catch (CartItemModifyException e) {
return ServiceUtil.returnError(e.getMessage());
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Sun Dec 12 21:31:27 2010
@@ -924,7 +924,7 @@ public class ShoppingCartItem implements
while (BigDecimal.valueOf(dayCount).compareTo(reservLength) < 0) {
GenericValue techDataCalendarExcDay = null;
// find an existing Day exception record
- Timestamp exceptionDateStartTime = new Timestamp((long) (reservStart.getTime() + (dayCount++ * 86400000)));
+ Timestamp exceptionDateStartTime = new Timestamp((reservStart.getTime() + (dayCount++ * 86400000)));
try {
techDataCalendarExcDay = delegator.findByPrimaryKey("TechDataCalendarExcDay",
UtilMisc.toMap("calendarId", fixedAsset.get("calendarId"), "exceptionDateStartTime", exceptionDateStartTime));
@@ -976,7 +976,7 @@ public class ShoppingCartItem implements
Debug.logError("Error calling isStoreInventoryAvailableOrNotRequired service, result is: " + invReqResult, module);
throw new CartItemModifyException((String) invReqResult.get(ModelService.ERROR_MESSAGE));
}
- inventoryAvailable = "Y".equals((String) invReqResult.get("availableOrNotRequired"));
+ inventoryAvailable = "Y".equals(invReqResult.get("availableOrNotRequired"));
} catch (GenericServiceException e) {
String errMsg = "Fatal error calling inventory checking services: " + e.toString();
Debug.logError(e, errMsg, module);
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Sun Dec 12 21:31:27 2010
@@ -276,7 +276,7 @@ public class ShoppingCartServices {
if (UtilValidate.isNotEmpty(orderPaymentPrefs)) {
Iterator<GenericValue> oppi = orderPaymentPrefs.iterator();
while (oppi.hasNext()) {
- GenericValue opp = (GenericValue) oppi.next();
+ GenericValue opp = oppi.next();
String paymentId = opp.getString("paymentMethodId");
if (paymentId == null) {
paymentId = opp.getString("paymentMethodTypeId");
@@ -560,7 +560,7 @@ public class ShoppingCartServices {
// set the item's ship group info
List<GenericValue> shipGroupAssocs = orh.getOrderItemShipGroupAssocs(item);
for (int g = 0; g < shipGroupAssocs.size(); g++) {
- GenericValue sgAssoc = (GenericValue) shipGroupAssocs.get(g);
+ GenericValue sgAssoc = shipGroupAssocs.get(g);
BigDecimal shipGroupQty = OrderReadHelper.getOrderItemShipGroupQuantity(sgAssoc);
if (shipGroupQty == null) {
shipGroupQty = BigDecimal.ZERO;
@@ -720,7 +720,7 @@ public class ShoppingCartServices {
// put them in a map: the key/values pairs are quoteItemSeqId/List of adjs
Map<String, List<GenericValue>> orderAdjsMap = FastMap.newInstance() ;
for (GenericValue quoteAdj : quoteAdjs) {
- List<GenericValue> orderAdjs = (List<GenericValue>)orderAdjsMap.get(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId);
+ List<GenericValue> orderAdjs = orderAdjsMap.get(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId);
if (orderAdjs == null) {
orderAdjs = FastList.newInstance();
orderAdjsMap.put(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId, orderAdjs);
@@ -852,7 +852,7 @@ public class ShoppingCartServices {
// If applyQuoteAdjustments is set to false then standard cart adjustments are used.
if (applyQuoteAdjustments) {
// The cart adjustments, derived from quote adjustments, are added to the cart
- List<GenericValue> adjs = (List<GenericValue>)orderAdjsMap.get(quoteId);
+ List<GenericValue> adjs = orderAdjsMap.get(quoteId);
if (adjs != null) {
cart.getAdjustments().addAll(adjs);
}
@@ -863,7 +863,7 @@ public class ShoppingCartServices {
ShoppingCartItem item = (ShoppingCartItem) i.next();
String orderItemSeqId = item.getOrderItemSeqId();
if (orderItemSeqId != null) {
- adjs = (List)orderAdjsMap.get(orderItemSeqId);
+ adjs = orderAdjsMap.get(orderItemSeqId);
} else {
adjs = null;
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEstimateWrapper.java Sun Dec 12 21:31:27 2010
@@ -116,7 +116,7 @@ public class ShippingEstimateWrapper {
}
public BigDecimal getShippingEstimate(GenericValue storeCarrierShipMethod) {
- return (BigDecimal) shippingEstimates.get(storeCarrierShipMethod);
+ return shippingEstimates.get(storeCarrierShipMethod);
}
}
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Sun Dec 12 21:31:27 2010
@@ -135,7 +135,7 @@ public class ShoppingListServices {
if (eli != null) {
GenericValue shoppingList;
- while (((shoppingList = (GenericValue) eli.next()) != null)) {
+ while (((shoppingList = eli.next()) != null)) {
Timestamp lastOrder = shoppingList.getTimestamp("lastOrderedDate");
GenericValue recurrenceInfo = null;
recurrenceInfo = shoppingList.getRelatedOne("RecurrenceInfo");
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskEvents.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/task/TaskEvents.java Sun Dec 12 21:31:27 2010
@@ -74,7 +74,7 @@ public class TaskEvents {
"fromDate", fromDate, "result", parameterMap, "userLogin", userLogin);
result = dispatcher.runSync("wfCompleteAssignment", context);
if (result.containsKey(ModelService.RESPOND_ERROR)) {
- request.setAttribute("_ERROR_MESSAGE_", (String) result.get(ModelService.ERROR_MESSAGE));
+ request.setAttribute("_ERROR_MESSAGE_", result.get(ModelService.ERROR_MESSAGE));
return "error";
}
} catch (GenericServiceException e) {
Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java Sun Dec 12 21:31:27 2010
@@ -1041,7 +1041,7 @@ public class ContactMechServices {
* Creates an EmailAddressVerification
*/
public static Map<String, Object> createEmailAddressVerification(DispatchContext dctx, Map<String, ? extends Object> context) {
- Delegator delegator = (Delegator) dctx.getDelegator();
+ Delegator delegator = dctx.getDelegator();
String emailAddress = (String) context.get("emailAddress");
String verifyHash = null;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWorker.java Sun Dec 12 21:31:27 2010
@@ -112,7 +112,7 @@ public class ProductConfigWorker {
try {
cnt = Integer.parseInt(opt);
String comments = null;
- ProductConfigWrapper.ConfigItem question = (ProductConfigWrapper.ConfigItem) configWrapper.getQuestions().get(k);
+ ProductConfigWrapper.ConfigItem question = configWrapper.getQuestions().get(k);
if (question.isSingleChoice()) {
comments = request.getParameter("comments_" + k + "_" + "0");
} else {
@@ -142,7 +142,7 @@ public class ProductConfigWorker {
List<String> selectedFeatures = FastList.newInstance();
Enumeration<String> paramNames = UtilGenerics.cast(request.getParameterNames());
while (paramNames.hasMoreElements()) {
- String paramName = (String)paramNames.nextElement();
+ String paramName = paramNames.nextElement();
if (paramName.startsWith("FT" + k + "_" + cnt + "_" + variantIndex)) {
selectedFeatures.add(request.getParameterValues(paramName)[0]);
}
@@ -342,7 +342,7 @@ public class ProductConfigWorker {
List<GenericValue> components = oneOption.getComponents();
for (GenericValue component: components) {
if (oneOption.isVirtualComponent(component)) {
- String componentOption = (String)oneOption.componentOptions.get(component.getString("productId"));
+ String componentOption = oneOption.componentOptions.get(component.getString("productId"));
GenericValue configOptionProductOption = delegator.makeValue("ConfigOptionProductOption");
configOptionProductOption.put("configId", configId);
configOptionProductOption.put("configItemId", configItemId);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Sun Dec 12 21:31:27 2010
@@ -242,7 +242,7 @@ public class ProductConfigWrapper implem
List<ConfigOption> avalOptions = ci.getOptions();
if (ci.isSingleChoice()) {
for (int j = 0; j < avalOptions.size(); j++) {
- ConfigOption oneOption = (ConfigOption)avalOptions.get(j);
+ ConfigOption oneOption = avalOptions.get(j);
oneOption.setSelected(false);
oneOption.setComments(null);
}
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java Sun Dec 12 21:31:27 2010
@@ -270,7 +270,7 @@ public class ProductFeatureServices {
// now figure out which of these combinations already have productIds associated with them
for (Map<String, Object> combination: oldCombinations) {
// Verify if the default code is already used, if so add a numeric suffix
- if (defaultVariantProductIds.contains((String) combination.get("defaultVariantProductId"))) {
+ if (defaultVariantProductIds.contains(combination.get("defaultVariantProductId"))) {
combination.put("defaultVariantProductId", combination.get("defaultVariantProductId") + "-" + (defaultCodeCounter < 10? "0" + defaultCodeCounter: "" + defaultCodeCounter));
defaultCodeCounter++;
}
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java Sun Dec 12 21:31:27 2010
@@ -89,7 +89,7 @@ public class ScaleImage {
/* ImageProperties.xml */
String imgPropertyFullPath = System.getProperty("ofbiz.home") + "/applications/product/config/ImageProperties.xml";
- resultXMLMap.putAll((Map<String, Object>) ImageTransform.getXMLValue(imgPropertyFullPath, locale));
+ resultXMLMap.putAll(ImageTransform.getXMLValue(imgPropertyFullPath, locale));
if (resultXMLMap.containsKey("responseMessage") && resultXMLMap.get("responseMessage").equals("success")) {
imgPropertyMap.putAll(UtilGenerics.<Map<String, Map<String, String>>>cast(resultXMLMap.get("xml")));
} else {
@@ -136,8 +136,8 @@ public class ScaleImage {
bufImg = (BufferedImage) resultBufImgMap.get("bufferedImage");
// get Dimensions
- imgHeight = (double) bufImg.getHeight();
- imgWidth = (double) bufImg.getWidth();
+ imgHeight = bufImg.getHeight();
+ imgWidth = bufImg.getWidth();
if (imgHeight == 0.0 || imgWidth == 0.0) {
String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_current_image_dimension_is_null", locale) + " : imgHeight = " + imgHeight + " ; imgWidth = " + imgWidth;
Debug.logError(errMsg, module);
@@ -187,7 +187,7 @@ public class ScaleImage {
// write new image
try {
- ImageIO.write((RenderedImage) bufNewImg, imgExtension, new File(imageServerPath + "/" + newFilePathPrefix + filenameToUse));
+ ImageIO.write(bufNewImg, imgExtension, new File(imageServerPath + "/" + newFilePathPrefix + filenameToUse));
} catch (IllegalArgumentException e) {
String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_parameter_is_null", locale) + e.toString();
Debug.logError(errMsg, module);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Sun Dec 12 21:31:27 2010
@@ -581,8 +581,8 @@ public class InventoryServices {
List<GenericValue> toBeStored = FastList.newInstance();
for (GenericValue orderItem: orderItems) {
String orderItemSeqId = orderItem.getString("orderItemSeqId");
- Timestamp shipDate = (Timestamp) backOrderedItems.get(orderItemSeqId);
- Timestamp cancelDate = (Timestamp) cancelItems.get(orderItemSeqId);
+ Timestamp shipDate = backOrderedItems.get(orderItemSeqId);
+ Timestamp cancelDate = cancelItems.get(orderItemSeqId);
Timestamp currentCancelDate = orderItem.getTimestamp("autoCancelDate");
Debug.logError("OI: " + orderId + " SEQID: "+ orderItemSeqId + " cancelAll: " + cancelAll + " cancelDate: " + cancelDate, module);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Sun Dec 12 21:31:27 2010
@@ -679,7 +679,7 @@ public class PriceServices {
return ServiceUtil.returnError("Error calculating VAT tax (with calcTaxForDisplay service)", null, null, calcTaxForDisplayResult);
}
// taxTotal, taxPercentage, priceWithTax
- result.put("price", (BigDecimal) calcTaxForDisplayResult.get("priceWithTax"));
+ result.put("price", calcTaxForDisplayResult.get("priceWithTax"));
// based on the taxPercentage calculate the other amounts, including: listPrice, defaultPrice, averageCost, promoPrice, competitivePrice
BigDecimal taxPercentage = (BigDecimal) calcTaxForDisplayResult.get("taxPercentage");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Sun Dec 12 21:31:27 2010
@@ -719,7 +719,7 @@ public class ProductSearch {
productIds.add(searchResult.getString("mainProductId"));
productIdSet.add(searchResult.getString("mainProductId"));
- while ((maxResults == null || numRetreived < maxResults.intValue()) && ((searchResult = (GenericValue) eli.next()) != null)) {
+ while ((maxResults == null || numRetreived < maxResults.intValue()) && ((searchResult = eli.next()) != null)) {
String productId = searchResult.getString("mainProductId");
if (!productIdSet.contains(productId)) {
productIds.add(productId);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?rev=1044931&r1=1044930&r2=1044931&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java Sun Dec 12 21:31:27 2010
@@ -212,7 +212,7 @@ public class ProductSearchEvents {
GenericValue searchResultView = null;
int numAdded = 0;
- while ((searchResultView = (GenericValue) eli.next()) != null) {
+ while ((searchResultView = eli.next()) != null) {
String productId = searchResultView.getString("mainProductId");
GenericValue pcm=delegator.makeValue("ProductCategoryMember");
@@ -301,7 +301,7 @@ public class ProductSearchEvents {
GenericValue searchResultView = null;
int numAdded = 0;
- while ((searchResultView = (GenericValue) eli.next()) != null) {
+ while ((searchResultView = eli.next()) != null) {
String productId = searchResultView.getString("mainProductId");
GenericValue pfa=delegator.makeValue("ProductFeatureAppl");
pfa.set("productId", productId);
@@ -360,7 +360,7 @@ public class ProductSearchEvents {
GenericValue searchResultView = null;
int numRemoved = 0;
- while ((searchResultView = (GenericValue) eli.next()) != null) {
+ while ((searchResultView = eli.next()) != null) {
String productId = searchResultView.getString("mainProductId");
numRemoved += delegator.removeByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureId", productFeatureId));
}