/[Apache-SVN]
ViewVC logotype

Revision 1747976


Jump to revision: Previous Next
Author: jleroux
Date: Sun Jun 12 10:43:58 2016 UTC (7 years, 10 months ago)
Changed paths: 15
Log Message:
No functional changes. While reviewing Wai's patch for OFBIZ-7112 I noticed that he (re)used this pattern introduced earlier:
  (resource == null || resource.length() <= 0)
From Java spec. a String, Collection, Map or CharSequence can't have a negative length, so the pattern above can be reduced to 
  (resource == null || resource.length() == 0)
which can be replaced using 
  UtilValidate.isEmpty()
I checked, there are several other occurrences of this pattern (some very old, I guess most were routinely copied from an initial occurrence). I decided to replace all of them, here they are.

I did that already long ago for the 
  (resource == null || resource.length() == 0)
pattern. It remains 4 of them. Three are justified (because of the dependency on base component or because using isEmpty() on Object is disputable for performance reasons). I took care of the remaining one right aways (in SplashScreen.java)


Changed paths

Path Details
Directoryofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java modified , text changed
Directoryofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java modified , text changed
Directoryofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java modified , text changed
Directoryofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java modified , text changed
Directoryofbiz/trunk/applications/product/src/org/ofbiz/product/catalog/CatalogWorker.java modified , text changed
Directoryofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java modified , text changed
Directoryofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java modified , text changed
Directoryofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java modified , text changed
Directoryofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java modified , text changed
Directoryofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile.java modified , text changed
Directoryofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java modified , text changed
Directoryofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelGroupReader.java modified , text changed
Directoryofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java modified , text changed
Directoryofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/GenericWebEvent.java modified , text changed
Directoryofbiz/trunk/specialpurpose/solr/src/org/ofbiz/solr/webapp/OFBizSolrContextFilter.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26