Author: jleroux
Date: Sat Nov 28 15:46:52 2009
New Revision: 885103
URL: http://svn.apache.org/viewvc?rev=885103&view=rev
Log:
Some cleaning related to is(Not)Empty
* remove duplicate ()
* remove casts no longer needed
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.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/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.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/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
(original)
+++
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
Sat Nov 28 15:46:52 2009
@@ -549,7 +549,7 @@
Timestamp lastModifiedDate = UtilDateTime.nowTimestamp();
// update status first to see if allowed
- if (UtilValidate.isNotEmpty((String) context.get("statusId"))) {
+ if (UtilValidate.isNotEmpty(context.get("statusId"))) {
Map statusInMap = UtilMisc.toMap("contentId",
context.get("contentId"), "statusId", context.get("statusId"),"userLogin",
userLogin);
try {
dispatcher.runSync("setContentStatus", statusInMap);
@@ -1114,7 +1114,7 @@
String key = (String)entry.getKey();
Object value = entry.getValue();
if (value instanceof String) {
- if (UtilValidate.isNotEmpty((String)value)) {
+ if (UtilValidate.isNotEmpty(value)) {
mapFiltered.put(key, value);
}
} else if (value != null) {
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
(original)
+++
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
Sat Nov 28 15:46:52 2009
@@ -178,7 +178,7 @@
} else {
map.put("contentAssocTypeId", contentAssocTypeId);
}
- if
(UtilValidate.isNotEmpty((String)map.get("contentAssocTypeId"))) {
+ if (UtilValidate.isNotEmpty(map.get("contentAssocTypeId"))) {
ftlResults = dispatcher.runSync("createContentAssoc", map);
isError =
ModelService.RESPOND_ERROR.equals(ftlResults.get(ModelService.RESPONSE_MESSAGE));
if (isError) {
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=885103&r1=885102&r2=885103&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
Sat Nov 28 15:46:52 2009
@@ -494,39 +494,39 @@
orderHeader.set("grandTotal", context.get("grandTotal"));
}
- if (UtilValidate.isNotEmpty((String) context.get("visitId"))) {
+ if (UtilValidate.isNotEmpty(context.get("visitId"))) {
orderHeader.set("visitId", context.get("visitId"));
}
- if (UtilValidate.isNotEmpty((String) context.get("internalCode"))) {
+ if (UtilValidate.isNotEmpty(context.get("internalCode"))) {
orderHeader.set("internalCode", context.get("internalCode"));
}
- if (UtilValidate.isNotEmpty((String) context.get("externalId"))) {
+ if (UtilValidate.isNotEmpty(context.get("externalId"))) {
orderHeader.set("externalId", context.get("externalId"));
}
- if (UtilValidate.isNotEmpty((String) context.get("originFacilityId")))
{
+ if (UtilValidate.isNotEmpty(context.get("originFacilityId"))) {
orderHeader.set("originFacilityId",
context.get("originFacilityId"));
}
- if (UtilValidate.isNotEmpty((String) context.get("productStoreId"))) {
+ if (UtilValidate.isNotEmpty(context.get("productStoreId"))) {
orderHeader.set("productStoreId", context.get("productStoreId"));
}
- if (UtilValidate.isNotEmpty((String) context.get("transactionId"))) {
+ if (UtilValidate.isNotEmpty(context.get("transactionId"))) {
orderHeader.set("transactionId", context.get("transactionId"));
}
- if (UtilValidate.isNotEmpty((String) context.get("terminalId"))) {
+ if (UtilValidate.isNotEmpty(context.get("terminalId"))) {
orderHeader.set("terminalId", context.get("terminalId"));
}
- if (UtilValidate.isNotEmpty((String)
context.get("autoOrderShoppingListId"))) {
+ if (UtilValidate.isNotEmpty(context.get("autoOrderShoppingListId"))) {
orderHeader.set("autoOrderShoppingListId",
context.get("autoOrderShoppingListId"));
}
- if (UtilValidate.isNotEmpty((String) context.get("webSiteId"))) {
+ if (UtilValidate.isNotEmpty(context.get("webSiteId"))) {
orderHeader.set("webSiteId", context.get("webSiteId"));
}
@@ -983,7 +983,7 @@
while (attributeRoleEntryIter.hasNext()) {
Map.Entry attributeRoleEntry = (Map.Entry)
attributeRoleEntryIter.next();
- if (UtilValidate.isNotEmpty((String)
context.get(attributeRoleEntry.getKey()))) {
+ if
(UtilValidate.isNotEmpty(context.get(attributeRoleEntry.getKey()))) {
// make sure the party is in the role before adding
toBeStored.add(delegator.makeValue("PartyRole",
UtilMisc.toMap("partyId", context.get(attributeRoleEntry.getKey()),
"roleTypeId", attributeRoleEntry.getValue())));
toBeStored.add(delegator.makeValue("OrderRole",
UtilMisc.toMap("orderId", orderId, "partyId",
context.get(attributeRoleEntry.getKey()), "roleTypeId",
attributeRoleEntry.getValue())));
@@ -1006,7 +1006,7 @@
}
// find all parties in role VENDOR associated with WebSite OR
ProductStore (where WebSite overrides, if specified), associated first valid
with the Order
- if (UtilValidate.isNotEmpty((String) context.get("productStoreId"))) {
+ if (UtilValidate.isNotEmpty(context.get("productStoreId"))) {
try {
List productStoreRoles =
delegator.findByAnd("ProductStoreRole", UtilMisc.toMap("roleTypeId", "VENDOR",
"productStoreId", context.get("productStoreId")), UtilMisc.toList("-fromDate"));
productStoreRoles = EntityUtil.filterByDate(productStoreRoles,
true);
@@ -1020,7 +1020,7 @@
}
}
- if (UtilValidate.isNotEmpty((String) context.get("webSiteId"))) {
+ if (UtilValidate.isNotEmpty(context.get("webSiteId"))) {
try {
List webSiteRoles = delegator.findByAnd("WebSiteRole",
UtilMisc.toMap("roleTypeId", "VENDOR", "webSiteId", context.get("webSiteId")),
UtilMisc.toList("-fromDate"));
webSiteRoles = EntityUtil.filterByDate(webSiteRoles, true);
Modified:
ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
(original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
Sat Nov 28 15:46:52 2009
@@ -375,7 +375,7 @@
// create a party if one doesn't already exist
String partyTypeId = "PARTY_GROUP";
- if (UtilValidate.isNotEmpty(((String)
context.get("partyTypeId")))) {
+ if (UtilValidate.isNotEmpty(context.get("partyTypeId"))) {
GenericValue desiredPartyType =
delegator.findByPrimaryKeyCache("PartyType", UtilMisc.toMap("partyTypeId",
context.get("partyTypeId")));
if (desiredPartyType != null &&
EntityTypeUtil.isType(desiredPartyType, partyGroupPartyType)) {
partyTypeId =
desiredPartyType.getString("partyTypeId");
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
Sat Nov 28 15:46:52 2009
@@ -535,9 +535,9 @@
}
String prioritizeCategoryId = null;
- if (UtilValidate.isNotEmpty((String)
parameters.get("PRIORITIZE_CATEGORY_ID"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("PRIORITIZE_CATEGORY_ID")))
{
prioritizeCategoryId = (String)
parameters.get("PRIORITIZE_CATEGORY_ID");
- } else if (UtilValidate.isNotEmpty((String) parameters.get("S_TPC"))) {
+ } else if (UtilValidate.isNotEmpty(parameters.get("S_TPC"))) {
prioritizeCategoryId = (String) parameters.get("S_TPC");
}
if (UtilValidate.isNotEmpty(prioritizeCategoryId)) {
@@ -546,7 +546,7 @@
}
// if there is another category, add a constraint for it
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_CATEGORY_ID"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_CATEGORY_ID"))) {
String searchCategoryId = (String)
parameters.get("SEARCH_CATEGORY_ID");
String searchSubCategories = (String)
parameters.get("SEARCH_SUB_CATEGORIES");
String searchCategoryExc = (String)
parameters.get("SEARCH_CATEGORY_EXC");
@@ -556,7 +556,7 @@
}
for (int catNum = 1; catNum < 10; catNum++) {
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_CATEGORY_ID" + catNum))) {
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_CATEGORY_ID" +
catNum))) {
String searchCategoryId = (String)
parameters.get("SEARCH_CATEGORY_ID" + catNum);
String searchSubCategories = (String)
parameters.get("SEARCH_SUB_CATEGORIES" + catNum);
String searchCategoryExc = (String)
parameters.get("SEARCH_CATEGORY_EXC" + catNum);
@@ -568,7 +568,7 @@
// a shorter variation for categories
for (int catNum = 1; catNum < 10; catNum++) {
- if (UtilValidate.isNotEmpty((String) parameters.get("S_CAT" +
catNum))) {
+ if (UtilValidate.isNotEmpty(parameters.get("S_CAT" + catNum))) {
String searchCategoryId = (String) parameters.get("S_CAT" +
catNum);
String searchSubCategories = (String) parameters.get("S_CSB" +
catNum);
String searchCategoryExc = (String) parameters.get("S_CEX" +
catNum);
@@ -579,7 +579,7 @@
}
// if there is any category selected try to use catalog and add a
constraint for it
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_CATALOG_ID"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_CATALOG_ID"))) {
String searchCatalogId = (String)
parameters.get("SEARCH_CATALOG_ID");
if (searchCatalogId != null &&
!searchCatalogId.equalsIgnoreCase("")) {
String topCategory =
CatalogWorker.getCatalogTopCategoryId(request, searchCatalogId);
@@ -593,7 +593,7 @@
}
// if keywords were specified, add a constraint for them
- if (UtilValidate.isNotEmpty((String) parameters.get("SEARCH_STRING")))
{
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_STRING"))) {
String keywordString = (String) parameters.get("SEARCH_STRING");
String searchOperator = (String) parameters.get("SEARCH_OPERATOR");
// defaults to true/Y, ie anything but N is true/Y
@@ -603,21 +603,21 @@
}
// if productName were specified, add a constraint for them
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_PRODUCT_NAME"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_PRODUCT_NAME"))) {
String productName = (String)
parameters.get("SEARCH_PRODUCT_NAME");
searchAddConstraint(new
ProductSearch.ProductFieldConstraint(productName, "productName"), session);
constraintsChanged = true;
}
// if internalName were specified, add a constraint for them
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_INTERNAL_PROD_NAME"))) {
+ if
(UtilValidate.isNotEmpty(parameters.get("SEARCH_INTERNAL_PROD_NAME"))) {
String internalName = (String)
parameters.get("SEARCH_INTERNAL_PROD_NAME");
searchAddConstraint(new
ProductSearch.ProductFieldConstraint(internalName, "internalName"), session);
constraintsChanged = true;
}
for (int kwNum = 1; kwNum < 10; kwNum++) {
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_STRING" + kwNum))) {
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_STRING" +
kwNum))) {
String keywordString = (String) parameters.get("SEARCH_STRING"
+ kwNum);
String searchOperator = (String)
parameters.get("SEARCH_OPERATOR" + kwNum);
// defaults to true/Y, ie anything but N is true/Y
@@ -707,7 +707,7 @@
}
// add a supplier to the search
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_SUPPLIER_ID")) || UtilValidate.isNotEmpty((String)
parameters.get("S_SUP"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_SUPPLIER_ID")) ||
UtilValidate.isNotEmpty(parameters.get("S_SUP"))) {
String supplierPartyId = (String)
parameters.get("SEARCH_SUPPLIER_ID");
if (UtilValidate.isEmpty(supplierPartyId)) supplierPartyId =
(String) parameters.get("S_SUP");
searchAddConstraint(new
ProductSearch.SupplierConstraint(supplierPartyId), session);
@@ -715,18 +715,18 @@
}
// add a list price range to the search
- if (UtilValidate.isNotEmpty((String) parameters.get("LIST_PRICE_LOW"))
|| UtilValidate.isNotEmpty((String) parameters.get("LIST_PRICE_HIGH"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("LIST_PRICE_LOW")) ||
UtilValidate.isNotEmpty(parameters.get("LIST_PRICE_HIGH"))) {
BigDecimal listPriceLow = null;
BigDecimal listPriceHigh = null;
String listPriceCurrency = UtilHttp.getCurrencyUom(request);
- if (UtilValidate.isNotEmpty((String)
parameters.get("LIST_PRICE_LOW"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("LIST_PRICE_LOW"))) {
try {
listPriceLow = new BigDecimal((String)
parameters.get("LIST_PRICE_LOW"));
} catch (NumberFormatException e) {
Debug.logError("Error parsing LIST_PRICE_LOW parameter ["
+ (String) parameters.get("LIST_PRICE_LOW") + "]: " + e.toString(), module);
}
}
- if (UtilValidate.isNotEmpty((String)
parameters.get("LIST_PRICE_HIGH"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("LIST_PRICE_HIGH"))) {
try {
listPriceHigh = new BigDecimal((String)
parameters.get("LIST_PRICE_HIGH"));
} catch (NumberFormatException e) {
@@ -736,7 +736,7 @@
searchAddConstraint(new
ProductSearch.ListPriceRangeConstraint(listPriceLow, listPriceHigh,
listPriceCurrency), session);
constraintsChanged = true;
}
- if (UtilValidate.isNotEmpty((String)
parameters.get("LIST_PRICE_RANGE")) || UtilValidate.isNotEmpty((String)
parameters.get("S_LPR"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("LIST_PRICE_RANGE")) ||
UtilValidate.isNotEmpty(parameters.get("S_LPR"))) {
String listPriceRangeStr = (String)
parameters.get("LIST_PRICE_RANGE");
if (UtilValidate.isEmpty(listPriceRangeStr)) listPriceRangeStr =
(String) parameters.get("S_LPR");
int underscoreIndex = listPriceRangeStr.indexOf("_");
@@ -783,8 +783,8 @@
constraintsChanged = true;
}
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_GOOD_IDENTIFICATION_TYPE")) ||
- UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_GOOD_IDENTIFICATION_VALUE"))) {
+ if
(UtilValidate.isNotEmpty(parameters.get("SEARCH_GOOD_IDENTIFICATION_TYPE")) ||
+
UtilValidate.isNotEmpty(parameters.get("SEARCH_GOOD_IDENTIFICATION_VALUE"))) {
String include = (String)
parameters.get("SEARCH_GOOD_IDENTIFICATION_INCL");
if (UtilValidate.isEmpty(include)) {
include = "Y";
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
Sat Nov 28 15:46:52 2009
@@ -952,7 +952,7 @@
String productContentTypeId = (String)
context.get("productContentTypeId");
ByteBuffer imageData = (ByteBuffer) context.get("uploadedFile");
- if (UtilValidate.isNotEmpty((String)
context.get("_uploadedFile_fileName"))) {
+ if (UtilValidate.isNotEmpty(context.get("_uploadedFile_fileName"))) {
String imageFilenameFormat =
UtilProperties.getPropertyValue("catalog", "image.filename.format");
String imageServerPath =
FlexibleStringExpander.expandString(UtilProperties.getPropertyValue("catalog",
"image.server.path"), context);
String imageUrlPrefix = UtilProperties.getPropertyValue("catalog",
"image.url.prefix");
Modified:
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
---
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java
(original)
+++
ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearchSession.java
Sat Nov 28 15:46:52 2009
@@ -185,13 +185,13 @@
}
// add a Work Effort Review to the search
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_STRING_REVIEW_TEXT"))) {
+ if
(UtilValidate.isNotEmpty(parameters.get("SEARCH_STRING_REVIEW_TEXT"))) {
String reviewText = (String)
parameters.get("SEARCH_STRING_REVIEW_TEXT");
searchAddConstraint(new
WorkEffortSearch.WorkEffortReviewConstraint(reviewText), session);
constraintsChanged = true;
}
// add a Work Effort Assoc Type to the search
- if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_WORK_EFFORT_ID"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_WORK_EFFORT_ID"))) {
String workEffortId=(String)
parameters.get("SEARCH_WORK_EFFORT_ID");
String workEffortAssocTypeId=(String)
parameters.get("workEffortAssocTypeId");
boolean includeAllSubWorkEfforts =!"N".equalsIgnoreCase((String)
parameters.get("SEARCH_SUB_WORK_EFFORTS"));
@@ -199,7 +199,7 @@
constraintsChanged = true;
}
// add a Work Effort Party Assignment to the search
- if (UtilValidate.isNotEmpty((String) parameters.get("partyId"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("partyId"))) {
String partyId=(String) parameters.get("partyId");
String roleTypeId=(String) parameters.get("roleTypeId");
searchAddConstraint(new
WorkEffortSearch.PartyAssignmentConstraint(partyId,roleTypeId), session);
@@ -207,10 +207,10 @@
}
// add a Product Set to the search
- if (UtilValidate.isNotEmpty((String) parameters.get("productId_1"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("productId_1"))) {
List<String> productSet = FastList.newInstance();
productSet.add((String) parameters.get("productId_1"));
- if (UtilValidate.isNotEmpty((String)
parameters.get("productId_2"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("productId_2"))) {
productSet.add((String) parameters.get("productId_2"));
}
searchAddConstraint(new
WorkEffortSearch.ProductSetConstraint(productSet), session);
@@ -218,14 +218,14 @@
}
// add a WorkEfort fromDate thruDate to the search
- if (UtilValidate.isNotEmpty((String) parameters.get("fromDate")) ||
UtilValidate.isNotEmpty((String) parameters.get("thruDate"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("fromDate")) ||
UtilValidate.isNotEmpty(parameters.get("thruDate"))) {
Timestamp fromDate =null;
- if (UtilValidate.isNotEmpty((String) parameters.get("fromDate"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("fromDate"))) {
fromDate=Timestamp.valueOf((String)
parameters.get("fromDate"));
}
Timestamp thruDate = null;
- if (UtilValidate.isNotEmpty((String) parameters.get("thruDate"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("thruDate"))) {
thruDate = Timestamp.valueOf((String)
parameters.get("thruDate"));
}
searchAddConstraint(new
WorkEffortSearch.LastUpdatedRangeConstraint(fromDate,thruDate), session);
@@ -233,7 +233,7 @@
}
// if keywords were specified, add a constraint for them
- if (UtilValidate.isNotEmpty((String) parameters.get("SEARCH_STRING")))
{
+ if (UtilValidate.isNotEmpty(parameters.get("SEARCH_STRING"))) {
String keywordString = (String) parameters.get("SEARCH_STRING");
String searchOperator = (String) parameters.get("SEARCH_OPERATOR");
// defaults to true/Y, ie anything but N is true/Y
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
(original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java Sat Nov
28 15:46:52 2009
@@ -757,7 +757,7 @@
public static boolean isEmpty(Object value) {
if (value == null) return true;
- if (value instanceof String) return UtilValidate.isEmpty((String)
value);
+ if (value instanceof String) return UtilValidate.isEmpty(value);
if (value instanceof Collection) return
UtilValidate.isEmpty((Collection<? extends Object>) value);
if (value instanceof Map) return UtilValidate.isEmpty((Map<? extends
Object, ? extends Object>) value);
if (value instanceof CharSequence) return
UtilValidate.isEmpty((CharSequence) value);
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Sat Nov 28
15:46:52 2009
@@ -532,7 +532,7 @@
public static void setInitialRequestInfo(HttpServletRequest request) {
HttpSession session = request.getSession();
- if (UtilValidate.isNotEmpty((String)
session.getAttribute("_WEBAPP_NAME_"))) {
+ if (UtilValidate.isNotEmpty(session.getAttribute("_WEBAPP_NAME_"))) {
// oops, info already in place...
return;
}
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
(original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
Sat Nov 28 15:46:52 2009
@@ -304,10 +304,10 @@
if (password == null) password = (String)
session.getAttribute("PASSWORD");
// allow a username and/or password in a request attribute to override
the request parameter or the session attribute; this way a preprocessor can
play with these a bit...
- if (UtilValidate.isNotEmpty((String)
request.getAttribute("USERNAME"))) {
+ if (UtilValidate.isNotEmpty(request.getAttribute("USERNAME"))) {
username = (String) request.getAttribute("USERNAME");
}
- if (UtilValidate.isNotEmpty((String)
request.getAttribute("PASSWORD"))) {
+ if (UtilValidate.isNotEmpty(request.getAttribute("PASSWORD"))) {
password = (String) request.getAttribute("PASSWORD");
}
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java
Sat Nov 28 15:46:52 2009
@@ -85,7 +85,7 @@
context.put("timeZone", UtilHttp.getTimeZone(request));
// if there was an error message, this is an error
- if (UtilValidate.isNotEmpty((String)
request.getAttribute("_ERROR_MESSAGE_"))) {
+ if (UtilValidate.isNotEmpty(request.getAttribute("_ERROR_MESSAGE_"))) {
context.put("isError", Boolean.TRUE);
} else {
context.put("isError", Boolean.FALSE);
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java
Sat Nov 28 15:46:52 2009
@@ -86,7 +86,7 @@
context.put("locale", UtilHttp.getLocale(request));
// if there was an error message, this is an error
- if (UtilValidate.isNotEmpty((String)
request.getAttribute("_ERROR_MESSAGE_"))) {
+ if (UtilValidate.isNotEmpty(request.getAttribute("_ERROR_MESSAGE_"))) {
context.put("isError", Boolean.TRUE);
} else {
context.put("isError", Boolean.FALSE);
Modified:
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
(original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
Sat Nov 28 15:46:52 2009
@@ -1026,7 +1026,7 @@
// set the order date with the eBay created date
Timestamp orderDate = UtilDateTime.nowTimestamp();
- if (UtilValidate.isNotEmpty((String) context.get("createdDate"))) {
+ if (UtilValidate.isNotEmpty(context.get("createdDate"))) {
orderDate = UtilDateTime.toTimestamp((String)
context.get("createdDate"));
}
cart.setOrderDate(orderDate);
@@ -1118,7 +1118,7 @@
// If matching party not found then try to find partyId from
PartyAttribute entity.
GenericValue partyAttribute = null;
- if (UtilValidate.isNotEmpty((String)
context.get("eiasTokenBuyer"))) {
+ if (UtilValidate.isNotEmpty(context.get("eiasTokenBuyer"))) {
partyAttribute =
EntityUtil.getFirst(delegator.findByAnd("PartyAttribute",
UtilMisc.toMap("attrValue", (String) context.get("eiasTokenBuyer"))));
if (UtilValidate.isNotEmpty(partyAttribute)) {
partyId = (String) partyAttribute.get("partyId");
Modified:
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java?rev=885103&r1=885102&r2=885103&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
(original)
+++
ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
Sat Nov 28 15:46:52 2009
@@ -633,7 +633,7 @@
// set the order date with the eBay created date
Timestamp orderDate = UtilDateTime.nowTimestamp();
- if (UtilValidate.isNotEmpty((String)
parameters.get("createdDate"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("createdDate"))) {
SimpleDateFormat sdf = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
Date createdDate = sdf.parse((String)
parameters.get("createdDate"));
orderDate = new Timestamp(createdDate.getTime());
@@ -716,7 +716,7 @@
String emailContactMechId = null;
String phoneContactMechId = null;
GenericValue partyAttribute = null;
- if
(UtilValidate.isNotEmpty((String)parameters.get("eiasTokenBuyer"))) {
+ if (UtilValidate.isNotEmpty(parameters.get("eiasTokenBuyer")))
{
partyAttribute =
EntityUtil.getFirst(delegator.findByAnd("PartyAttribute",
UtilMisc.toMap("attrValue", (String)parameters.get("eiasTokenBuyer"))));
}