You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by su...@apache.org on 2020/07/18 06:56:03 UTC
[ofbiz-plugins] branch trunk updated: Improved: Corrected all
checkstyle formatting issues: 'typecast' is not followed by whitespace in
plugins component. (OFBIZ-11887)
This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2144763 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in plugins component. (OFBIZ-11887)
2144763 is described below
commit 2144763bc0f7130e443e48fd1a3835d352a577d7
Author: Suraj Khurana <su...@hotwax.co>
AuthorDate: Sat Jul 18 12:26:04 2020 +0530
Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in plugins component.
(OFBIZ-11887)
---
.../ofbiz/assetmaint/FixedAssetMaintServices.java | 4 +-
.../apache/ofbiz/bi/util/DimensionServices.java | 2 +-
.../java/org/apache/ofbiz/birt/BirtFactory.java | 2 +-
.../birt/flexible/BirtMasterReportServices.java | 2 +-
.../ofbiz/birt/flexible/ReportDesignGenerator.java | 2 +-
.../birt/report/servlet/BirtEngineServlet.java | 3 +-
.../org/apache/ofbiz/ebay/EbayOrderServices.java | 6 +--
.../apache/ofbiz/ebay/ImportOrdersFromEbay.java | 12 +++---
.../apache/ofbiz/ebay/ProductsExportToEbay.java | 7 ++--
.../org/apache/ofbiz/ebaystore/EbayEvents.java | 44 +++++++++++-----------
.../org/apache/ofbiz/ebaystore/EbayFeedback.java | 2 +-
.../java/org/apache/ofbiz/ebaystore/EbayStore.java | 27 +++++++------
.../ofbiz/ebaystore/EbayStoreCategoryFacade.java | 8 ++--
.../ofbiz/ebaystore/EbayStoreCustomerService.java | 6 +--
.../apache/ofbiz/ebaystore/EbayStoreHelper.java | 16 ++++----
.../apache/ofbiz/ebaystore/EbayStoreOptions.java | 10 ++---
.../org/apache/ofbiz/ebaystore/EbayStoreOrder.java | 2 +-
.../ofbiz/ecommerce/janrain/JanrainHelper.java | 10 ++---
.../ldap/cas/OFBizCasAuthenticationHandler.java | 2 +-
.../ofbiz/content/search/ProductDocument.java | 10 ++---
.../apache/ofbiz/content/search/SearchEvents.java | 4 +-
.../org/apache/ofbiz/htmlreport/HtmlReport.java | 4 +-
.../ofbiz/htmlreport/util/ReportEncoder.java | 22 +++++------
.../java/org/apache/ofbiz/scrum/ScrumServices.java | 2 +-
.../java/org/apache/ofbiz/webpos/WebPosEvents.java | 2 +-
25 files changed, 104 insertions(+), 107 deletions(-)
diff --git a/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java b/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java
index fe00ae5..d83bf25 100644
--- a/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java
+++ b/assetmaint/src/main/java/org/apache/ofbiz/assetmaint/FixedAssetMaintServices.java
@@ -67,7 +67,7 @@ public class FixedAssetMaintServices {
// Call issuance service
Map<String, Object> result = dispatcher.runSync("getInventoryAvailableByFacility", findCurrInventoryParams);
if (ServiceUtil.isError(result)) {
- return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "AssetMaintProblemGettingInventoryLevel", locale) + productId , null, null, result);
+ return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "AssetMaintProblemGettingInventoryLevel", locale) + productId, null, null, result);
}
Object atpObj = result.get("availableToPromiseTotal");
double atp = 0.0;
@@ -75,7 +75,7 @@ public class FixedAssetMaintServices {
atp = Double.parseDouble(atpObj.toString());
}
if (requestedQty > atp) {
- return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "AssetMaintLowPartInventoryError", UtilMisc.toMap("productId", productId , "quantity", Double.toString(atp)), locale));
+ return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE, "AssetMaintLowPartInventoryError", UtilMisc.toMap("productId", productId, "quantity", Double.toString(atp)), locale));
}
EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList(
EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId),
diff --git a/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java b/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java
index 38fbf95..062bfd2 100644
--- a/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java
+++ b/bi/src/main/java/org/apache/ofbiz/bi/util/DimensionServices.java
@@ -157,7 +157,7 @@ public class DimensionServices {
dateValue.set("yearName", Long.valueOf(calendar.get(Calendar.YEAR)));
dateValue.set("weekOfMonth", Long.valueOf(calendar.get(Calendar.WEEK_OF_MONTH)));
dateValue.set("weekOfYear", Long.valueOf(calendar.get(Calendar.WEEK_OF_YEAR)));
- dateValue.set("weekdayType", (dayOfWeek == 1 || dayOfWeek == 7? "Weekend": "Weekday"));
+ dateValue.set("weekdayType", (dayOfWeek == 1 || dayOfWeek == 7 ? "Weekend" : "Weekday"));
dateValue.set("yearMonthDay", yearMonthDayFormat.format(currentDate));
dateValue.set("yearAndMonth", yearMonthFormat.format(currentDate));
diff --git a/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java b/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java
index 83e251a..1de779b 100644
--- a/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java
+++ b/birt/src/main/java/org/apache/ofbiz/birt/BirtFactory.java
@@ -81,7 +81,7 @@ public class BirtFactory {
throw new IllegalArgumentException("Could not resolve location to URL: " + resourceName);
}
reportInputStream = reportFileUrl.openStream();
- double totalSeconds = (System.currentTimeMillis() - startTime)/1000.0;
+ double totalSeconds = (System.currentTimeMillis() - startTime) / 1000.0;
Debug.logInfo("Got report in " + totalSeconds + "s from: " + reportFileUrl.toExternalForm(), MODULE);
}
diff --git a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java
index 4fbfb12..be41662 100644
--- a/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java
+++ b/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java
@@ -350,7 +350,7 @@ public class BirtMasterReportServices {
.where(conditionOrderId)
.cache()
.queryFirst();
- if (UtilValidate.isNotEmpty(productStoreList) && ! productStoreList.contains(productStore.getString("productStoreId"))) {
+ if (UtilValidate.isNotEmpty(productStoreList) && !productStoreList.contains(productStore.getString("productStoreId"))) {
continue; // FIXME pretty ugly... but had problems with the rare case where an invoice matches with several orders with more than one productStore
}
invoiceEditable.put("productStoreId", productStore.getString("productStoreId"));
diff --git a/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java b/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java
index 7822893..c70f191 100644
--- a/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java
+++ b/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java
@@ -222,7 +222,7 @@ public class ReportDesignGenerator {
design.saveAs(rptDesignName);
design.close();
- if (Debug.infoOn())Debug.logInfo("####### Design generated: " + rptDesignName, MODULE);
+ if (Debug.infoOn()) Debug.logInfo("####### Design generated: " + rptDesignName, MODULE);
session.closeAll(false);
Platform.shutdown();
}
diff --git a/birt/src/main/java/org/apache/ofbiz/birt/report/servlet/BirtEngineServlet.java b/birt/src/main/java/org/apache/ofbiz/birt/report/servlet/BirtEngineServlet.java
index 45ee419..8903e3a 100644
--- a/birt/src/main/java/org/apache/ofbiz/birt/report/servlet/BirtEngineServlet.java
+++ b/birt/src/main/java/org/apache/ofbiz/birt/report/servlet/BirtEngineServlet.java
@@ -49,7 +49,6 @@ public class BirtEngineServlet extends org.eclipse.birt.report.servlet.BirtEngin
} catch (GeneralException e) {
throw new BirtException(e.getMessage());
}
- return new BirtContext(new ViewerServletRequest(ParameterAccessor.getParameter(request, ParameterAccessor.PARAM_REPORT)
- , request), response);
+ return new BirtContext(new ViewerServletRequest(ParameterAccessor.getParameter(request, ParameterAccessor.PARAM_REPORT), request), response);
}
}
diff --git a/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java b/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
index b970cd7..f723b12 100644
--- a/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
+++ b/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
@@ -457,7 +457,7 @@ public class EbayOrderServices {
Element ordersElement = ordersElemIter.next();
String externalOrderId = UtilXml.childElementValue(ordersElement, "OrderID");
orderCtx.put("externalId", "EBO_" + externalOrderId);
- GenericValue orderExist = externalOrderExists(delegator, (String)orderCtx.get("externalId"));
+ GenericValue orderExist = externalOrderExists(delegator, (String) orderCtx.get("externalId"));
if (orderExist != null) {
orderCtx.put("orderId", orderExist.get("orderId"));
} else {
@@ -684,7 +684,7 @@ public class EbayOrderServices {
while (containingOrdersIter.hasNext()) {
Element containingOrdersElement = containingOrdersIter.next();
String orderId = UtilXml.childElementValue(containingOrdersElement, "OrderID");
- if (getSellerTransactionsContainingOrderList != null && ! getSellerTransactionsContainingOrderList.contains(orderId)) {
+ if (getSellerTransactionsContainingOrderList != null && !getSellerTransactionsContainingOrderList.contains(orderId)) {
getSellerTransactionsContainingOrderList.add(orderId);
}
}
@@ -877,7 +877,7 @@ public class EbayOrderServices {
}
orderCtx.put("transactionId", "EBI_" + itemId);
- GenericValue orderExist = externalOrderExists(delegator, (String)orderCtx.get("externalId"));
+ GenericValue orderExist = externalOrderExists(delegator, (String) orderCtx.get("externalId"));
if (orderExist != null) {
orderCtx.put("orderId", orderExist.get("orderId"));
} else {
diff --git a/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java b/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
index f3898b9..16859bd 100755
--- a/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
+++ b/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
@@ -67,7 +67,7 @@ public class ImportOrdersFromEbay {
if (!ServiceUtil.isFailure(buildGetSellerTransactionsRequest(context, sellerTransactionsItemsXml, eBayConfigResult.get("token").toString()))) {
result = EbayHelper.postItem(eBayConfigResult.get("xmlGatewayUri").toString(), sellerTransactionsItemsXml, eBayConfigResult.get("devID").toString(), eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "GetSellerTransactions", eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString());
- String success = (String)result.get(ModelService.SUCCESS_MESSAGE);
+ String success = (String) result.get(ModelService.SUCCESS_MESSAGE);
if (success != null) {
result = checkOrders(delegator, dispatcher, locale, context, success);
}
@@ -152,7 +152,7 @@ public class ImportOrdersFromEbay {
}
// get externalId from OrderHeader
- externalId = (String)orderHeader.get("externalId");
+ externalId = (String) orderHeader.get("externalId");
transactionId = orderHeader.getString("transactionId");
String productStoreId = (String) orderHeader.get("productStoreId");
if (UtilValidate.isNotEmpty(productStoreId)) {
@@ -167,7 +167,7 @@ public class ImportOrdersFromEbay {
if (!ServiceUtil.isFailure(buildCompleteSaleRequest(delegator, locale, externalId, transactionId, context, completeSaleXml, eBayConfigResult.get("token").toString()))) {
result = EbayHelper.postItem(eBayConfigResult.get("xmlGatewayUri").toString(), completeSaleXml, eBayConfigResult.get("devID").toString(), eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "CompleteSale", eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString());
- String successMessage = (String)result.get("successMessage");
+ String successMessage = (String) result.get("successMessage");
if (successMessage != null) {
return readCompleteSaleResponse(successMessage, locale);
} else {
@@ -464,7 +464,7 @@ public class ImportOrdersFromEbay {
if (UtilValidate.isEmpty(productId)) {
productId = UtilXml.childElementValue(itemElement, "ApplicationData", "");
if (UtilValidate.isEmpty(productId)) {
- productId = EbayHelper.retrieveProductIdFromTitle(delegator, (String)order.get("title"));
+ productId = EbayHelper.retrieveProductIdFromTitle(delegator, (String) order.get("title"));
}
}
order.put("productId", productId);
@@ -507,7 +507,7 @@ public class ImportOrdersFromEbay {
}
order.put("transactionId", "EBI_" + itemId);
- GenericValue orderExist = externalOrderExists(delegator, (String)order.get("externalId"));
+ GenericValue orderExist = externalOrderExists(delegator, (String) order.get("externalId"));
if (orderExist != null) {
order.put("orderId", orderExist.get("orderId"));
} else {
@@ -794,7 +794,7 @@ public class ImportOrdersFromEbay {
Debug.logInfo("Creating order.", MODULE);
Map<String, Object> orderCreate = checkout.createOrder(userLogin);
- String orderId = (String)orderCreate.get("orderId");
+ String orderId = (String) orderCreate.get("orderId");
Debug.logInfo("Created order with id: " + orderId, MODULE);
// approve the order
diff --git a/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java b/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
index 0bd66d5..e87b94f 100755
--- a/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
+++ b/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java
@@ -135,7 +135,7 @@ public class ProductsExportToEbay {
if (Debug.verboseOn()) {
Debug.logVerbose("Request of " + callName + " To eBay:\n" + dataItems.toString(), MODULE);
}
- HttpURLConnection connection = (HttpURLConnection)(new URL(postItemsUrl)).openConnection();
+ HttpURLConnection connection = (HttpURLConnection) (new URL(postItemsUrl)).openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestMethod("POST");
@@ -155,8 +155,7 @@ public class ProductsExportToEbay {
Map<String, Object> result = new HashMap<>();
String response = null;
- if (responseCode == HttpURLConnection.HTTP_CREATED ||
- responseCode == HttpURLConnection.HTTP_OK) {
+ if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_OK) {
inputStream = connection.getInputStream();
response = toString(inputStream);
result = ServiceUtil.returnSuccess(response);
@@ -532,7 +531,7 @@ public class ProductsExportToEbay {
StringBuffer dataItemsXml = new StringBuffer();
if (!ServiceUtil.isFailure(buildCategoriesXml(context, dataItemsXml, eBayConfigResult.get("token").toString(), eBayConfigResult.get("siteID").toString(), categoryParent, levelLimit))) {
Map<String, Object> resultCat = postItem(eBayConfigResult.get("xmlGatewayUri").toString(), dataItemsXml, eBayConfigResult.get("devID").toString(), eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "GetCategories", eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString());
- String successMessage = (String)resultCat.get("successMessage");
+ String successMessage = (String) resultCat.get("successMessage");
if (successMessage != null) {
result = readEbayCategoriesResponse(successMessage, locale);
} else {
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java
index 4f43f24..46f2213 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java
@@ -99,22 +99,22 @@ public class EbayEvents {
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
Map<String, Object> requestParams = UtilHttp.getParameterMap(request);
GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
- int feedbackSize = Integer.parseInt((String)requestParams.get("feedbackSize"));
- String productStoreId = (String)requestParams.get("productStoreId");
+ int feedbackSize = Integer.parseInt((String) requestParams.get("feedbackSize"));
+ String productStoreId = (String) requestParams.get("productStoreId");
for (int i = 1; i <= feedbackSize; i++) {
- String commentType = (String)requestParams.get("commentType"+i);
- String commentText = (String)requestParams.get("commentText"+i);
+ String commentType = (String) requestParams.get("commentType"+i);
+ String commentText = (String) requestParams.get("commentText"+i);
if (!"none".equals(commentType) && commentText != null) {
- String itemId = (String)requestParams.get("itemId"+i);
- String transactionId = (String)requestParams.get("transactionId"+i);
- String targetUser = (String)requestParams.get("targetUser"+i);
- String commentingUser = (String)requestParams.get("commentingUser"+i);
- String role = (String)requestParams.get("role"+i);
- String ratingItem = (String)requestParams.get("ratingItem"+i);
- String ratingComm = (String)requestParams.get("ratingComm"+i);
- String ratingShip = (String)requestParams.get("ratingShip"+i);
- String ratingShipHand = (String)requestParams.get("ratingShipHand"+i);
- String AqItemAsDescribedId = (String)requestParams.get("AqItemAsDescribedId"+i);
+ String itemId = (String) requestParams.get("itemId"+i);
+ String transactionId = (String) requestParams.get("transactionId"+i);
+ String targetUser = (String) requestParams.get("targetUser"+i);
+ String commentingUser = (String) requestParams.get("commentingUser"+i);
+ String role = (String) requestParams.get("role"+i);
+ String ratingItem = (String) requestParams.get("ratingItem"+i);
+ String ratingComm = (String) requestParams.get("ratingComm"+i);
+ String ratingShip = (String) requestParams.get("ratingShip"+i);
+ String ratingShipHand = (String) requestParams.get("ratingShipHand"+i);
+ String AqItemAsDescribedId = (String) requestParams.get("AqItemAsDescribedId"+i);
Map<String, Object> leavefeedback = new HashMap<>();
leavefeedback.put("productStoreId", productStoreId);
@@ -319,10 +319,10 @@ public class EbayEvents {
if (UtilValidate.isEmpty(session.getAttribute(siteFacadeName))) {
session.setAttribute(siteFacadeName, new EbayStoreSiteFacade(apiContext));
if (UtilValidate.isNotEmpty(session.getAttribute(siteFacadeName))) {
- siteFacade = (EbayStoreSiteFacade)session.getAttribute(siteFacadeName);
+ siteFacade = (EbayStoreSiteFacade) session.getAttribute(siteFacadeName);
}
} else {
- siteFacade = (EbayStoreSiteFacade)session.getAttribute(siteFacadeName);
+ siteFacade = (EbayStoreSiteFacade) session.getAttribute(siteFacadeName);
}
Debug.logInfo("loaded session for ebay site Facade is ".concat(siteFacadeName).concat(session.getAttribute(siteFacadeName).toString()), MODULE);
return siteFacade;
@@ -336,7 +336,7 @@ public class EbayEvents {
Debug.logError("Required productStoreId for get ebay API config data.", MODULE);
return null;
}
- ApiContext apiContext = EbayStoreHelper.getApiContext(request.getParameter("productStoreId") != null ? request.getParameter("productStoreId"):(String)request.getAttribute("productStoreId"), locale, delegator);
+ ApiContext apiContext = EbayStoreHelper.getApiContext(request.getParameter("productStoreId") != null ? request.getParameter("productStoreId") : (String) request.getAttribute("productStoreId"), locale, delegator);
return apiContext;
}
@@ -454,7 +454,7 @@ public class EbayEvents {
// find child of selected ebay categories
for (StoreCustomCategoryType csCate : csCateList) {
if (categoryId.equals(String.valueOf(csCate.getCategoryID()))) {
- StoreCustomCategoryType [] childCategories = csCate.getChildCategory();
+ StoreCustomCategoryType[] childCategories = csCate.getChildCategory();
for (StoreCustomCategoryType childCategoryId : childCategories) {
categories.add(childCategoryId);
}
@@ -489,7 +489,7 @@ public class EbayEvents {
return null;
}
if (request.getParameter("categoryId") != null || request.getAttribute("categoryId") != null) {
- categoryId = request.getParameter("categoryId") != null ? request.getParameter("categoryId") : (String)request.getAttribute("categoryId");
+ categoryId = request.getParameter("categoryId") != null ? request.getParameter("categoryId") : (String) request.getAttribute("categoryId");
Debug.logInfo("Load child categories from session following site id and categoryId is ".concat(categoryId), MODULE);
} else {
Debug.logWarning("No categoryId to get child categories.", MODULE);
@@ -532,7 +532,7 @@ public class EbayEvents {
request.setAttribute("_ERROR_MESSAGE_", "No ebay category or productId selected with form id ".concat(isProductId));
return "error";
}
- String categoryId = (String)requestParams.get("ebayCategory");
+ String categoryId = (String) requestParams.get("ebayCategory");
if (categoryId.contains("false")) {
request.setAttribute("_ERROR_MESSAGE_", "Please select ebay category with low level of categories.");
return "error";
@@ -832,7 +832,7 @@ public class EbayEvents {
}
StorefrontType storeFront = new StorefrontType();
if (UtilValidate.isNotEmpty(requestParams.get("ebayStore1Category"))) {
- String ebayStore1Category = (String)requestParams.get("ebayStore1Category");
+ String ebayStore1Category = (String) requestParams.get("ebayStore1Category");
if (ebayStore1Category.contains("false")) {
request.setAttribute("_ERROR_MESSAGE_", "Please select ebay store category with low level of categories.");
return "error";
@@ -844,7 +844,7 @@ public class EbayEvents {
}
if (UtilValidate.isNotEmpty(requestParams.get("ebayStore2Category"))) {
- String ebayStore2Category = (String)requestParams.get("ebayStore2Category");
+ String ebayStore2Category = (String) requestParams.get("ebayStore2Category");
if (ebayStore2Category.contains("false")) {
request.setAttribute("_ERROR_MESSAGE_", "Please select ebay store category with low level of categories.");
return "error";
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java
index c1af76d..9f6ddea 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java
@@ -71,7 +71,7 @@ public class EbayFeedback {
if (ServiceUtil.isError(resultUser)) {
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultUser));
}
- String userID = (String)resultUser.get("userLoginId");
+ String userID = (String) resultUser.get("userLoginId");
GetFeedbackCall feedbackCall = new GetFeedbackCall();
feedbackCall.setApiContext(apiContext);
SiteCodeType siteCodeType = EbayStoreHelper.getSiteCodeType(productStoreId, locale, delegator);
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java
index dd21922..da00da8 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java
@@ -167,7 +167,7 @@ public class EbayStore {
if (Debug.verboseOn()) {
Debug.logVerbose("Request of " + callName + " To eBay:\n" + dataItems.toString(), MODULE);
}
- HttpURLConnection connection = (HttpURLConnection)(new URL(postItemsUrl)).openConnection();
+ HttpURLConnection connection = (HttpURLConnection) (new URL(postItemsUrl)).openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestMethod("POST");
@@ -187,8 +187,7 @@ public class EbayStore {
Map<String, Object> result = new HashMap<>();
String response = null;
- if (responseCode == HttpURLConnection.HTTP_CREATED ||
- responseCode == HttpURLConnection.HTTP_OK) {
+ if (responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_OK) {
inputStream = connection.getInputStream();
response = toString(inputStream);
result = ServiceUtil.returnSuccess(response);
@@ -626,10 +625,10 @@ public class EbayStore {
try {
List<GenericValue> productStoreRoles = EntityQuery.use(delegator).from("ProductStoreRole").where("productStoreId", context.get("productStoreId").toString(), "roleTypeId", "EBAY_ACCOUNT").queryList();
if (productStoreRoles.size() != 0) {
- partyId= (String)productStoreRoles.get(0).get("partyId");
+ partyId= (String) productStoreRoles.get(0).get("partyId");
List<GenericValue> userLogins = EntityQuery.use(delegator).from("UserLogin").where("partyId", partyId).queryList();
if (userLogins.size() != 0) {
- userLoginId = (String)userLogins.get(0).get("userLoginId");
+ userLoginId = (String) userLogins.get(0).get("userLoginId");
}
}
@@ -1341,8 +1340,8 @@ public class EbayStore {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
GetMyeBaySellingCall getMyeBaySellingCall = new GetMyeBaySellingCall(apiContext);
ItemListCustomizationType activeList = new ItemListCustomizationType();
- getMyeBaySellingCall.setActiveList(activeList );
- DetailLevelCodeType[] level = {DetailLevelCodeType.RETURN_ALL};
+ getMyeBaySellingCall.setActiveList(activeList);
+ DetailLevelCodeType[] level = { DetailLevelCodeType.RETURN_ALL };
getMyeBaySellingCall.setDetailLevel(level);
getMyeBaySellingCall.getMyeBaySelling();
PaginatedItemArrayType itemListCustomizationType = getMyeBaySellingCall.getReturnedActiveList();
@@ -1412,7 +1411,7 @@ public class EbayStore {
GetSellingManagerSoldListingsCall sellingManagerSoldListings = new GetSellingManagerSoldListingsCall(apiContext);
if (UtilValidate.isNotEmpty(filter)) {
SellingManagerSoldListingsPropertyTypeCodeType[] filterObject = {SellingManagerSoldListingsPropertyTypeCodeType.valueOf(filter)};
- sellingManagerSoldListings.setFilter(filterObject );
+ sellingManagerSoldListings.setFilter(filterObject);
}
if (UtilValidate.isNotEmpty(itemId)) {
SellingManagerSearchType search = new SellingManagerSearchType();
@@ -1763,7 +1762,7 @@ public class EbayStore {
result.put("checkVerify", true);
} catch (Exception e) {
result.put("checkVerify", checkVerify);
- result.put("errorMessage" , "This item ( " + itemID + " ) can not add second chance offer.");
+ result.put("errorMessage", "This item ( " + itemID + " ) can not add second chance offer.");
result.put("responseMessage", "error");
return result;
}
@@ -2267,7 +2266,7 @@ public class EbayStore {
fileOutputStream.close();
// Set path file picture to api and set picture details.
- String [] pictureFiles = {System.getProperty("ofbiz.home") + File.separator + "runtime" + File.separator + "tmp" + File.separator + imageFileName};
+ String[] pictureFiles = {System.getProperty("ofbiz.home") + File.separator + "runtime" + File.separator + "tmp" + File.separator + imageFileName};
PictureDetailsType pictureDetails = new PictureDetailsType();
pictureDetails.setGalleryType(GalleryTypeCodeType.GALLERY);
pictureDetails.setPhotoDisplay(PhotoDisplayCodeType.NONE);
@@ -2285,11 +2284,11 @@ public class EbayStore {
return ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE, "EbayStoreUpdateItemSuccessfully", locale));
}
public Map<String, Object> geteBayClosedItem(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map <String, Object> result = new HashMap<>();
+ Map<String, Object> result = new HashMap<>();
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
String productStoreId = (String) context.get("productStoreId");
- List <Map<String, Object>> closedItems = new LinkedList<>();
+ List<Map<String, Object>> closedItems = new LinkedList<>();
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
ItemListCustomizationType itemListType = new ItemListCustomizationType();
@@ -2350,8 +2349,8 @@ public class EbayStore {
}
return result;
}
- public static Map<String , Object> getClosedItem(ItemType tempItems) {
- Map <String, Object> result = new HashMap<>();
+ public static Map<String, Object> getClosedItem(ItemType tempItems) {
+ Map<String, Object> result = new HashMap<>();
if (UtilValidate.isNotEmpty(tempItems)) {
double hitCount = 0;
int quantity = 0;
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java
index 511727b..ea1054f 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCategoryFacade.java
@@ -116,12 +116,12 @@ public class EbayStoreCategoryFacade {
FeatureDefinitionsType featureDefinition = this.siteFacade.getSiteFeatureDefinitionsMap().get(apiContext.getSite());
//get itemSpecificsEnabled feature
- itemSpecificEnabled = (ItemSpecificsEnabledCodeType)getInheritProperty(catId, "getItemSpecificsEnabled", categoriesCacheMap, cfsMap);
+ itemSpecificEnabled = (ItemSpecificsEnabledCodeType) getInheritProperty(catId, "getItemSpecificsEnabled", categoriesCacheMap, cfsMap);
if (itemSpecificEnabled == null) {
itemSpecificEnabled = siteDefaults.getItemSpecificsEnabled();
}
//get returnPolicyEnabled feature
- retPolicyEnabled = (Boolean)getInheritProperty(catId, "isReturnPolicyEnabled", categoriesCacheMap, cfsMap);
+ retPolicyEnabled = (Boolean) getInheritProperty(catId, "isReturnPolicyEnabled", categoriesCacheMap, cfsMap);
if (retPolicyEnabled == null) {
retPolicyEnabled = siteDefaults.isReturnPolicyEnabled();
}
@@ -135,7 +135,7 @@ public class EbayStoreCategoryFacade {
}
//get listing types
- ListingDurationReferenceType[] listingDuration = (ListingDurationReferenceType[])getInheritProperty(catId, "getListingDuration", categoriesCacheMap, cfsMap);
+ ListingDurationReferenceType[] listingDuration = (ListingDurationReferenceType[]) getInheritProperty(catId, "getListingDuration", categoriesCacheMap, cfsMap);
if (listingDuration == null || listingDuration.length == 0) {
listingDuration = siteDefaults.getListingDuration();
}
@@ -145,7 +145,7 @@ public class EbayStoreCategoryFacade {
}
//get payment methods
- paymentMethods = (BuyerPaymentMethodCodeType[])getInheritProperty(catId, "getPaymentMethod", categoriesCacheMap, cfsMap);
+ paymentMethods = (BuyerPaymentMethodCodeType[]) getInheritProperty(catId, "getPaymentMethod", categoriesCacheMap, cfsMap);
if (paymentMethods == null || paymentMethods.length == 0) {
paymentMethods = siteDefaults.getPaymentMethod();
}
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java
index e8a5b73..6e17160 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java
@@ -52,7 +52,7 @@ public class EbayStoreCustomerService {
if (UtilValidate.isEmpty(context.get("userId")) || UtilValidate.isEmpty(context.get("itemId"))) {
return ServiceUtil.returnFailure(UtilProperties.getMessage(RESOURCE, "EbayStoreRequiredUserIdAndItemId", locale));
}
- Map <String, Object> result = new HashMap<>();
+ Map<String, Object> result = new HashMap<>();
try {
String itemId = (String) context.get("itemId");
String bestOfferId = (String) context.get("bestOfferId");
@@ -111,7 +111,7 @@ public class EbayStoreCustomerService {
String price = (String) context.get("price");
String email = (String) context.get("email");
String quantity = (String) context.get("quantity");
- Map <String, Object> result = new HashMap<>();
+ Map<String, Object> result = new HashMap<>();
try {
ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
String[] bestOfferIDs = {offerId};
@@ -153,7 +153,7 @@ public class EbayStoreCustomerService {
Delegator delegator = dctx.getDelegator();
String productStoreId = (String) context.get("productStoreId");
Locale locale = (Locale) context.get("locale");
- Map <String, Object> result = new HashMap<>();
+ Map<String, Object> result = new HashMap<>();
if (UtilValidate.isEmpty(context.get("itemId")) || UtilValidate.isEmpty(context.get("userId"))) {
return ServiceUtil.returnFailure(UtilProperties.getMessage(RESOURCE, "EbayStoreRequiredUserIdAndItemId", locale));
}
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java
index 17e164c..8046487 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java
@@ -105,11 +105,11 @@ public class EbayStoreHelper {
apiLogging.setLogExceptions(false);
apiLogging.setLogSOAPMessages(false);
- String devID = (String)config.get("devId");
- String appID = (String)config.get("appID");
- String certID = (String)config.get("certID");
- String token = (String)config.get("token");
- String apiServerUrl = (String)config.get("apiServerUrl");
+ String devID = (String) config.get("devId");
+ String appID = (String) config.get("appID");
+ String certID = (String) config.get("certID");
+ String token = (String) config.get("token");
+ String apiServerUrl = (String) config.get("apiServerUrl");
if (token != null) {
apiCredential.seteBayToken(token);
@@ -133,7 +133,7 @@ public class EbayStoreHelper {
context.put("locale", locale);
context.put("productStoreId", productStoreId);
Map<String, Object> config = EbayHelper.buildEbayConfig(context, delegator);
- String siteId = (String)config.get("siteID");
+ String siteId = (String) config.get("siteID");
if (siteId != null) {
if ("0".equals(siteId)) return SiteCodeType.US;
if ("2".equals(siteId)) return SiteCodeType.CANADA;
@@ -347,7 +347,7 @@ public class EbayStoreHelper {
try {
GenericValue ebayProductPref = EntityQuery.use(delegator).from("EbayProductStorePref").where("productStoreId", productStoreId, "autoPrefEnumId", autoPrefEnumId).queryOne();
String jobId = ebayProductPref.getString("autoPrefJobId");
- List<GenericValue> jobs = EntityQuery.use(delegator).from("JobSandbox").where("parentJobId", jobId , "statusId", "SERVICE_PENDING").queryList();
+ List<GenericValue> jobs = EntityQuery.use(delegator).from("JobSandbox").where("parentJobId", jobId, "statusId", "SERVICE_PENDING").queryList();
Map<String, Object>inMap = new HashMap<>();
inMap.put("userLogin", userLogin);
@@ -404,7 +404,7 @@ public class EbayStoreHelper {
String[] tempShipLocation = new String[shippingLocationDetails.length];
for (ShippingLocationDetailsType shippingLocationDetail : shippingLocationDetails) {
String shippingLocation = shippingLocationDetail.getShippingLocation();
- String shipParam = (String)requestParams.get("Shipping_".concat(shippingLocation));
+ String shipParam = (String) requestParams.get("Shipping_".concat(shippingLocation));
if ("true".equals(shipParam)) {
tempShipLocation[i] = shippingLocation;
attributeMapList.put(""+shippingLocation, shippingLocation);
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
index dc49b21..d713c7d 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOptions.java
@@ -68,9 +68,9 @@ public class EbayStoreOptions {
try {
Map<String, Object> paramMap = UtilHttp.getCombinedMap(request);
if (paramMap.get("productStoreId") != null) {
- String themeId = (String)paramMap.get("themeId");
+ String themeId = (String) paramMap.get("themeId");
- GetStoreOptionsCall call = new GetStoreOptionsCall(EbayStoreHelper.getApiContext((String)paramMap.get("productStoreId"), locale, delegator));
+ GetStoreOptionsCall call = new GetStoreOptionsCall(EbayStoreHelper.getApiContext((String) paramMap.get("productStoreId"), locale, delegator));
req = new GetStoreOptionsRequestType();
resp = (GetStoreOptionsResponseType) call.execute(req);
@@ -131,7 +131,7 @@ public class EbayStoreOptions {
public static String retrieveItemTemplateByTemplateGroupId(HttpServletRequest request, HttpServletResponse response) {
Map<String, Object> paramMap = UtilHttp.getCombinedMap(request);
if (paramMap.get("productStoreId") != null) {
- String temGroupId = (String)paramMap.get("templateGroupId");
+ String temGroupId = (String) paramMap.get("templateGroupId");
Map<String, Object> addItemObj = EbayEvents.getAddItemListingObject(request, EbayEvents.getApiContext(request));
if (UtilValidate.isNotEmpty(addItemObj)) {
String refName = "itemCateFacade_".concat((String) paramMap.get("pkCategoryId"));
@@ -152,7 +152,7 @@ public class EbayStoreOptions {
try {
Map<String, Object> paramMap = UtilHttp.getCombinedMap(request);
if (paramMap.get("productStoreId") != null) {
- String ebayCategoryId = (String)paramMap.get("ebayCategoryId");
+ String ebayCategoryId = (String) paramMap.get("ebayCategoryId");
// when change category should be remove old category from session
if (ebayCategoryId.indexOf("CH_") != -1) {
ebayCategoryId = ebayCategoryId.replace("CH_", "");
@@ -199,7 +199,7 @@ public class EbayStoreOptions {
try {
Map<String, Object> paramMap = UtilHttp.getCombinedMap(request);
if (paramMap.get("productStoreId") != null) {
- String ebayStoreCategory = (String)paramMap.get("ebayCategoryId");
+ String ebayStoreCategory = (String) paramMap.get("ebayCategoryId");
// when change category should be remove old category from session
if (ebayStoreCategory.indexOf("CH_") != -1) {
ebayStoreCategory = ebayStoreCategory.replace("CH_", "");
diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
index 350dd94..9752bdb 100644
--- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
+++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java
@@ -311,7 +311,7 @@ public class EbayStoreOrder {
LocalDispatcher dispatcher = dctx.getDispatcher();
Locale locale = (Locale) context.get("locale");
GenericValue userLogin = (GenericValue) context.get("userLogin");
- Map <String, Object> result = new HashMap<>();
+ Map<String, Object> result = new HashMap<>();
String productStoreId = context.get("productStoreId").toString();
String defaultCurrencyUomId = null;
diff --git a/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java b/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
index 379943b..72e6739 100644
--- a/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
+++ b/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
@@ -83,11 +83,11 @@ public class JanrainHelper {
HashMap<String, List<String>> result = new HashMap<>();
NodeList mappings = getNodeList("/rsp/mappings/mapping", rsp);
for (int i = 0; i < mappings.getLength(); i++) {
- Element mapping = (Element)mappings.item(i);
+ Element mapping = (Element) mappings.item(i);
List<String> identifiers = new ArrayList<>();
NodeList rk_list = getNodeList("primaryKey", mapping);
NodeList id_list = getNodeList("identifiers/identifier", mapping);
- String remote_key = ((Element)rk_list.item(0)).getTextContent();
+ String remote_key = ((Element) rk_list.item(0)).getTextContent();
for (int j = 0; j < id_list.getLength(); j++) {
Element ident = (Element) id_list.item(j);
identifiers.add(ident.getTextContent());
@@ -109,11 +109,11 @@ public class JanrainHelper {
Map<String, Object> query = new HashMap<>();
query.put("primaryKey", primaryKey);
Element rsp = apiCall("mappings", query);
- Element oids = (Element)rsp.getFirstChild();
+ Element oids = (Element) rsp.getFirstChild();
List<String> result = new ArrayList<>();
NodeList nl = oids.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
- Element e = (Element)nl.item(i);
+ Element e = (Element) nl.item(i);
result.add(e.getTextContent());
}
return result;
@@ -155,7 +155,7 @@ public class JanrainHelper {
String data = sb.toString();
try {
URL url = new URL(baseUrl + "/api/v2/" + methodName);
- HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setDoOutput(true);
conn.connect();
diff --git a/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java b/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java
index 12f407a..5a7025d 100644
--- a/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java
+++ b/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java
@@ -126,7 +126,7 @@ public final class OFBizCasAuthenticationHandler extends AbstractOFBizAuthentica
int n = rand(lo, hi);
byte b[] = new byte[n];
for (int i = 0; i < n; i++) {
- b[i] = (byte)rand('a', 'z');
+ b[i] = (byte) rand('a', 'z');
}
return new String(b);
}
diff --git a/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java b/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
index 61059a7..2fb7cf8 100644
--- a/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
+++ b/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
@@ -95,9 +95,9 @@ public class ProductDocument implements LuceneDocument {
doc.add(new StringField("isVariant", product.get("isVariant") != null && product.getBoolean("isVariant") ? "true" : "false", Field.Store.NO));
// ProductFeature Fields, check that at least one of the fields is set to be indexed
- if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.description", "0", delegator)) ||
- !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.abbrev", "0", delegator)) ||
- !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.idCode", "0", delegator))) {
+ if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.description", "0", delegator))
+ || !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.abbrev", "0", delegator))
+ || !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductFeatureAndAppl.idCode", "0", delegator))) {
List<GenericValue> productFeatureAndAppls = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", productId).queryList();
productFeatureAndAppls = filterByThruDate(productFeatureAndAppls);
@@ -137,8 +137,8 @@ public class ProductDocument implements LuceneDocument {
}
// ProductAttribute Fields
- if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrName", "0", delegator)) ||
- !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrValue", "0", delegator))) {
+ if (!"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrName", "0", delegator))
+ || !"0".equals(EntityUtilProperties.getPropertyValue("prodsearch", "index.weight.ProductAttribute.attrValue", "0", delegator))) {
List<GenericValue> productAttributes = EntityQuery.use(delegator).from("ProductAttribute").where("productId", productId).queryList();
for (GenericValue productAttribute: productAttributes) {
diff --git a/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java b/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java
index f848ae1..ac3d6cc 100644
--- a/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java
+++ b/lucene/src/main/java/org/apache/ofbiz/content/search/SearchEvents.java
@@ -46,11 +46,11 @@ public class SearchEvents {
Map<String, Object> result;
Map<String, Object> serviceInMap = new HashMap<>();
HttpSession session = request.getSession();
- GenericValue userLogin = (GenericValue)session.getAttribute("userLogin");
+ GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
serviceInMap.put("userLogin", userLogin);
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
- String siteId = (String)paramMap.get("contentId");
+ String siteId = (String) paramMap.get("contentId");
serviceInMap.put("contentId", siteId);
try {
result = dispatcher.runSync("indexContentTree", serviceInMap);
diff --git a/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java b/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
index ac942fd..792c218 100644
--- a/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
+++ b/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
@@ -243,7 +243,7 @@ public class HtmlReport extends AbstractReport {
if ((obj instanceof String) || (obj instanceof StringBuffer)) {
result.append(obj);
} else if (obj instanceof Throwable) {
- result.append(getExceptionElementJS((Throwable)obj));
+ result.append(getExceptionElementJS((Throwable) obj));
}
if (isTransient) {
content.remove(indexNext);
@@ -544,7 +544,7 @@ public class HtmlReport extends AbstractReport {
for (int j=0; j<threads.length; j++) {
Thread threadInstance = threads[j];
if (threadInstance instanceof AbstractReportThread) {
- if (((AbstractReportThread)threadInstance).getUUID().toString().equals(getParamThread(request))) {
+ if (((AbstractReportThread) threadInstance).getUUID().toString().equals(getParamThread(request))) {
thread = (AbstractReportThread) threadInstance;
break;
}
diff --git a/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java b/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java
index 7e1b6db..a5b8caa 100644
--- a/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java
+++ b/pricat/src/main/java/org/apache/ofbiz/htmlreport/util/ReportEncoder.java
@@ -215,12 +215,12 @@ public final class ReportEncoder {
int c = Integer.valueOf(value);
if (c < 128) {
// first 128 chars are contained in almost every charset
- entity = new String(new char[] {(char)c});
+ entity = new String(new char[] {(char) c});
// this is intended as performance improvement since
// the canEncode() operation appears quite CPU heavy
- } else if (encoder.canEncode((char)c)) {
+ } else if (encoder.canEncode((char) c)) {
// encoder can encode this char
- entity = new String(new char[] {(char)c});
+ entity = new String(new char[] {(char) c});
}
matcher.appendReplacement(result, entity);
}
@@ -303,12 +303,12 @@ public final class ReportEncoder {
int c = buffer.get(i);
if (c < 128) {
// first 128 chars are contained in almost every charset
- result.append((char)c);
+ result.append((char) c);
// this is intended as performance improvement since
// the canEncode() operation appears quite CPU heavy
- } else if (encoder.canEncode((char)c)) {
+ } else if (encoder.canEncode((char) c)) {
// encoder can encode this char
- result.append((char)c);
+ result.append((char) c);
} else {
// append HTML entity reference
result.append(ENTITY_PREFIX);
@@ -337,12 +337,12 @@ public final class ReportEncoder {
int c = buffer.get(i);
if (c < 128) {
// first 128 chars are contained in almost every charset
- result.append((char)c);
+ result.append((char) c);
// this is intended as performance improvement since
// the canEncode() operation appears quite CPU heavy
- } else if (encoder.canEncode((char)c)) {
+ } else if (encoder.canEncode((char) c)) {
// encoder can encode this char
- result.append((char)c);
+ result.append((char) c);
} else {
// append Java entity reference
result.append("\\u");
@@ -420,7 +420,7 @@ public final class ReportEncoder {
result.append(ch);
result.append(";");
} else {
- result.append((char)ch);
+ result.append((char) ch);
}
}
return new String(result);
@@ -448,7 +448,7 @@ public final class ReportEncoder {
result.append(ch);
result.append(";");
} else {
- result.append((char)ch);
+ result.append((char) ch);
}
}
return new String(result);
diff --git a/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java b/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java
index 264ea6e..ca8f614 100644
--- a/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java
+++ b/scrum/src/main/java/org/apache/ofbiz/scrum/ScrumServices.java
@@ -209,7 +209,7 @@ public class ScrumServices {
Debug.logInfo("Revision Link ============== >>>>>>>>>>> "+ revisionLink, MODULE);
if (UtilValidate.isNotEmpty(taskId)) {
String version = "R" + i;
- List <GenericValue> workeffContentList = EntityQuery.use(delegator).from("WorkEffortAndContentDataResource").where("contentName", version.trim() , "drObjectInfo", revisionLink.trim()).queryList();
+ List<GenericValue> workeffContentList = EntityQuery.use(delegator).from("WorkEffortAndContentDataResource").where("contentName", version.trim(), "drObjectInfo", revisionLink.trim()).queryList();
List<EntityCondition> exprsAnd = new LinkedList<>();
exprsAnd.add(EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, taskId));
diff --git a/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java b/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java
index bd2ee00..00284cf 100755
--- a/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java
+++ b/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java
@@ -62,7 +62,7 @@ public class WebPosEvents {
session.removeAttribute("webPosSession");
WebPosSession webPosSession = WebPosEvents.getWebPosSession(request, posTerminalId);
String responseString = LoginEvents.storeLogin(request, response);
- GenericValue userLoginNew = (GenericValue)session.getAttribute("userLogin");
+ GenericValue userLoginNew = (GenericValue) session.getAttribute("userLogin");
if (userLoginNew != null && UtilValidate.isNotEmpty(posTerminalId)) {
webPosSession.setUserLogin(userLoginNew);