Author: deepak
Date: Mon Oct 16 10:43:56 2017 New Revision: 1812282 URL: http://svn.apache.org/viewvc?rev=1812282&view=rev Log: Inconsistent String Comparisons, Applied patch for plugins classes. Thanks Devanshu Vyas for your contribution (OFBIZ-9254) Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/LdapLoginWorker.java ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlReport.java ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java Mon Oct 16 10:43:56 2017 @@ -239,7 +239,7 @@ public class BirtEmailServices { // Only override the default contentType in case of plaintext, since other contentTypes may be multipart // and would require specific handling. - if (contentType != null && contentType.equalsIgnoreCase("text/plain")) { + if (contentType != null && "text/plain".equalsIgnoreCase(contentType)) { serviceContext.put("contentType", "text/plain"); } else { serviceContext.put("contentType", "text/html"); Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java Mon Oct 16 10:43:56 2017 @@ -145,7 +145,7 @@ public class BirtServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorConversionFieldToBirtFailed", locale)); } // make more general when report forms have been made so too. - if (birtType.equalsIgnoreCase("date-time") || birtType.equalsIgnoreCase("date") || birtType.equalsIgnoreCase("time")) { + if ("date-time".equalsIgnoreCase(birtType) || "date".equalsIgnoreCase(birtType) || "time".equalsIgnoreCase(birtType)) { listMultiFields.add(field + "_fld0_op"); listMultiFields.add(field + "_fld0_value"); listMultiFields.add(field + "_fld1_op"); @@ -238,7 +238,7 @@ public class BirtServices { } String attrName = masterContentAttribute.getString("attrName"); String reportContentId; - if (attrName.equalsIgnoreCase("Entity")) { + if ("Entity".equalsIgnoreCase(attrName)) { String entityViewName = masterContentAttribute.getString("attrValue"); ModelEntity modelEntity = delegator.getModelEntity(entityViewName); if (modelEntity == null) { @@ -255,7 +255,7 @@ public class BirtServices { Debug.logError(e, module); return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorCannotDetermineDataSource", locale)); } - } else if (attrName.equalsIgnoreCase("Service")) { + } else if ("Service".equalsIgnoreCase(attrName)) { String serviceName = masterContentAttribute.getString("attrValue"); try { Map<String, Object> resultContent = dispatcher.runSync("createFlexibleReportFromMasterServiceWorkflow", UtilMisc.toMap("serviceName", serviceName, Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java (original) +++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java Mon Oct 16 10:43:56 2017 @@ -80,7 +80,7 @@ public class BirtViewHandler implements IReportRunnable design = null; // add dynamic parameter for page - if (UtilValidate.isEmpty(page) || page.equals("ExecuteFlexibleReport")) { + if (UtilValidate.isEmpty(page) || "ExecuteFlexibleReport".equals(page)) { page = (String) request.getParameter("rptDesignFile"); } if (UtilValidate.isEmpty(page)) { Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayHelper.java Mon Oct 16 10:43:56 2017 @@ -383,7 +383,7 @@ public class EbayHelper { map.put("countryGeoId", geoId); country = geoId; Debug.logInfo("Country geoid: " + geoId, module); - if (geoId.equals("USA") || geoId.equals("CAN")) { + if ("USA".equals(geoId) || "CAN".equals(geoId)) { if (UtilValidate.isNotEmpty(state)) { map.put("stateProvinceGeoId", state.toUpperCase()); } Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java Mon Oct 16 10:43:56 2017 @@ -1153,7 +1153,7 @@ public class EbayOrderServices { contactMechId = EbayHelper.setShippingAddressContactMech(dispatcher, delegator, party, userLogin, shippingAddressCtx); String emailBuyer = (String) context.get("emailBuyer"); - if (!(emailBuyer.equals("") || emailBuyer.equalsIgnoreCase("Invalid Request"))) { + if (!(emailBuyer.equals("") || "Invalid Request".equalsIgnoreCase(emailBuyer))) { EbayHelper.setEmailContactMech(dispatcher, delegator, party, userLogin, context); } EbayHelper.setPhoneContactMech(dispatcher, delegator, party, userLogin, shippingAddressCtx); @@ -1187,7 +1187,7 @@ public class EbayOrderServices { Debug.logInfo("Creating association to eBay buyer for party: " + partyId, module); EbayHelper.createEbayCustomer(dispatcher, partyId, (String) context.get("ebayUserIdBuyer"), eiasTokenBuyer, userLogin); String emailBuyer = (String) context.get("emailBuyer"); - if (UtilValidate.isNotEmpty(emailBuyer) && !emailBuyer.equalsIgnoreCase("Invalid Request")) { + if (UtilValidate.isNotEmpty(emailBuyer) && !"Invalid Request".equalsIgnoreCase(emailBuyer)) { Debug.logInfo("Creating new email for party: " + partyId, module); EbayHelper.createPartyEmail(dispatcher, partyId, emailBuyer, userLogin); } Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java Mon Oct 16 10:43:56 2017 @@ -738,7 +738,7 @@ public class ImportOrdersFromEbay { contactMechId = EbayHelper.setShippingAddressContactMech(dispatcher, delegator, party, userLogin, parameters); String emailBuyer = (String) parameters.get("emailBuyer"); - if (!(emailBuyer.equals("") || emailBuyer.equalsIgnoreCase("Invalid Request"))) { + if (!(emailBuyer.equals("") || "Invalid Request".equalsIgnoreCase(emailBuyer))) { EbayHelper.setEmailContactMech(dispatcher, delegator, party, userLogin, parameters); } EbayHelper.setPhoneContactMech(dispatcher, delegator, party, userLogin, parameters); @@ -767,7 +767,7 @@ public class ImportOrdersFromEbay { Debug.logInfo("Creating association to eBay buyer for party: " + partyId, module); EbayHelper.createEbayCustomer(dispatcher, partyId, (String) parameters.get("ebayUserIdBuyer"), (String) parameters.get("eiasTokenBuyer"), userLogin); String emailBuyer = (String) parameters.get("emailBuyer"); - if (UtilValidate.isNotEmpty(emailBuyer) && !emailBuyer.equalsIgnoreCase("Invalid Request")) { + if (UtilValidate.isNotEmpty(emailBuyer) && !"Invalid Request".equalsIgnoreCase(emailBuyer)) { Debug.logInfo("Creating new email for party: " + partyId, module); EbayHelper.createPartyEmail(dispatcher, partyId, emailBuyer, userLogin); } Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ProductsExportToEbay.java Mon Oct 16 10:43:56 2017 @@ -243,7 +243,7 @@ public class ProductsExportToEbay { listingFormat = (String) context.get("listingFormat"); UtilXml.addChildElementValue(itemElem, "ListingType", listingFormat, itemDocument); } - if (listingFormat.equals("FixedPriceItem")) { + if ("FixedPriceItem".equals(listingFormat)) { Element startPriceElem = UtilXml.addChildElementValue(itemElem, "StartPrice", startPrice, itemDocument); if (UtilValidate.isEmpty(startPriceCurrencyUomId)) { startPriceCurrencyUomId = EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD", delegator); Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayEvents.java Mon Oct 16 10:43:56 2017 @@ -104,7 +104,7 @@ public class EbayEvents { for (int i = 1; i <= feedbackSize; i++) { String commentType = (String)requestParams.get("commentType"+i); String commentText = (String)requestParams.get("commentText"+i); - if (!commentType.equals("none") && commentText != null) { + 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); @@ -1110,7 +1110,7 @@ public class EbayEvents { AddItemCall addItemCall = (AddItemCall) itemObj.get("addItemCall"); ItemType item = addItemCall.getItem(); String productId = item.getSKU(); - if (UtilValidate.isNotEmpty(itemObj.get("requireEbayInventory")) && (itemObj.get("requireEbayInventory").equals("Y"))) { + if (UtilValidate.isNotEmpty(itemObj.get("requireEbayInventory")) && ("Y".equals(itemObj.get("requireEbayInventory")))) { GetSellingManagerInventoryRequestType req = new GetSellingManagerInventoryRequestType(); GetSellingManagerInventoryResponseType resp = null; SellingManagerProductType[] returnedSellingManagerProductType = null; Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayFeedback.java Mon Oct 16 10:43:56 2017 @@ -284,7 +284,7 @@ public class EbayFeedback { leaveFeedbackCall.setTargetUser(targetUser); leaveFeedbackCall.setTransactionID(transactionId); - if (role.equals("seller")) { + if ("seller".equals(role)) { ItemRatingDetailArrayType sellerItemRatingDetailArray = new ItemRatingDetailArrayType(); //The item description @@ -360,11 +360,11 @@ public class EbayFeedback { feedbackDetail.setCommentingUser(commentingUser); feedbackDetail.setCommentText(commentText); feedbackDetail.setCommentTime(Calendar.getInstance()); - if (commentType.equals("positive")) { + if ("positive".equals(commentType)) { feedbackDetail.setCommentType(CommentTypeCodeType.POSITIVE); - } else if (commentType.equals("neutral")) { + } else if ("neutral".equals(commentType)) { feedbackDetail.setCommentType(CommentTypeCodeType.NEUTRAL); - } else if (commentType.equals("negative")) { + } else if ("negative".equals(commentType)) { feedbackDetail.setCommentType(CommentTypeCodeType.NEGATIVE); } leaveFeedbackCall.setFeedbackDetail(feedbackDetail); Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java Mon Oct 16 10:43:56 2017 @@ -362,7 +362,7 @@ public class EbayStore { } catch (GenericEntityException e) { result = ServiceUtil.returnError(e.getMessage()); } - if (result.get("responseMessage") != null && result.get("responseMessage").equals("fail")) { + if (result.get("responseMessage") != null && "fail".equals(result.get("responseMessage"))) { result = ServiceUtil.returnError(result.get("errorMessage").toString()); } return result; @@ -1244,7 +1244,7 @@ public class EbayStore { StoreColorSchemeType storeColorScheme = null; StoreColorType storecolor = null; StoreFontType storeFont = null; - if (context.get("themeType").equals("Advanced")) { + if ("Advanced".equals(context.get("themeType"))) { storeColorScheme = new StoreColorSchemeType(); if (context.get("storeAdvancedThemeColor") != null) storeColorScheme.setColorSchemeID(Integer.parseInt((String)context.get("storeAdvancedThemeColor"))); @@ -1256,7 +1256,7 @@ public class EbayStore { storeTheme.setColorScheme(storeColorScheme); storeTheme.setName(null); storeTheme.setThemeID(Integer.parseInt((String)context.get("storeAdvancedTheme"))); - } else if (context.get("themeType").equals("Basic")) { + } else if ("Basic".equals(context.get("themeType"))) { storeColorScheme = new StoreColorSchemeType(); if (context.get("storeBasicTheme")!=null) { String storeBasicTheme = (String)context.get("storeBasicTheme"); @@ -1654,25 +1654,25 @@ public class EbayStore { public static DisputeExplanationCodeType getEbayDisputeExplanationCodeType(String disputeExplanationCode) { DisputeExplanationCodeType disputeExplanationCodeType = null; if (disputeExplanationCode != null) { - if (disputeExplanationCode.equals("BUYER_HAS_NOT_RESPONDED")) { + if ("BUYER_HAS_NOT_RESPONDED".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.BUYER_HAS_NOT_RESPONDED; - } else if (disputeExplanationCode.equals("BUYER_REFUSED_TO_PAY")) { + } else if ("BUYER_REFUSED_TO_PAY".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.BUYER_REFUSED_TO_PAY; - } else if (disputeExplanationCode.equals("BUYER_RETURNED_ITEM_FOR_REFUND")) { + } else if ("BUYER_RETURNED_ITEM_FOR_REFUND".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.BUYER_RETURNED_ITEM_FOR_REFUND; - } else if (disputeExplanationCode.equals("UNABLE_TO_RESOLVE_TERMS")) { + } else if ("UNABLE_TO_RESOLVE_TERMS".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.UNABLE_TO_RESOLVE_TERMS; - } else if (disputeExplanationCode.equals("BUYER_PURCHASING_MISTAKE")) { + } else if ("BUYER_PURCHASING_MISTAKE".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.BUYER_PURCHASING_MISTAKE; - } else if (disputeExplanationCode.equals("SHIP_COUNTRY_NOT_SUPPORTED")) { + } else if ("SHIP_COUNTRY_NOT_SUPPORTED".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.SHIP_COUNTRY_NOT_SUPPORTED; - } else if (disputeExplanationCode.equals("SHIPPING_ADDRESS_NOT_CONFIRMED")) { + } else if ("SHIPPING_ADDRESS_NOT_CONFIRMED".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.SHIPPING_ADDRESS_NOT_CONFIRMED; - } else if (disputeExplanationCode.equals("PAYMENT_METHOD_NOT_SUPPORTED")) { + } else if ("PAYMENT_METHOD_NOT_SUPPORTED".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.PAYMENT_METHOD_NOT_SUPPORTED; - } else if (disputeExplanationCode.equals("BUYER_NO_LONGER_REGISTERED")) { + } else if ("BUYER_NO_LONGER_REGISTERED".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.BUYER_NO_LONGER_REGISTERED; - } else if (disputeExplanationCode.equals("BUYER_NO_LONGER_REGISTERED")) { + } else if ("BUYER_NO_LONGER_REGISTERED".equals(disputeExplanationCode)) { disputeExplanationCodeType = DisputeExplanationCodeType.BUYER_NO_LONGER_REGISTERED; } else { disputeExplanationCodeType = DisputeExplanationCodeType.OTHER_EXPLANATION; @@ -1686,9 +1686,9 @@ public class EbayStore { public static DisputeReasonCodeType getEbayDisputeReasonCodeType(String disputeReasonCode) { DisputeReasonCodeType disputeReasonCodeType = null; if (disputeReasonCode != null) { - if (disputeReasonCode.equals("TRANSACTION_MUTUALLY_CANCELED")) { + if ("TRANSACTION_MUTUALLY_CANCELED".equals(disputeReasonCode)) { disputeReasonCodeType = DisputeReasonCodeType.TRANSACTION_MUTUALLY_CANCELED; - } else if (disputeReasonCode.equals("BUYER_HAS_NOT_PAID")) { + } else if ("BUYER_HAS_NOT_PAID".equals(disputeReasonCode)) { disputeReasonCodeType = DisputeReasonCodeType.BUYER_HAS_NOT_PAID; } } @@ -1759,7 +1759,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; } Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPrefEvents.java Mon Oct 16 10:43:56 2017 @@ -55,30 +55,30 @@ public class EbayStoreAutoPrefEvents{ String condition10 = (String) requestParams.get("lessThanValue"); String condition11 = (String) requestParams.get("rejectLessMsg"); if (UtilValidate.isNotEmpty(enabled)) { - if (enabled.equals("Y") && UtilValidate.isEmpty(condition1)) { + if ("Y".equals(enabled) && UtilValidate.isEmpty(condition1)) { String errMsg = "Please select Based Price."; request.setAttribute("_ERROR_MESSAGE_", errMsg); return "error"; } - if (enabled.equals("Y") && UtilValidate.isEmpty(condition2)) { + if ("Y".equals(enabled) && UtilValidate.isEmpty(condition2)) { String errMsg = "Please enter \"Percent value to accept.\""; request.setAttribute("_ERROR_MESSAGE_", errMsg); return "error"; } - if (enabled.equals("Y") && condition5.equals("Y") && (UtilValidate.isEmpty(condition6) || UtilValidate.isEmpty(condition7) || UtilValidate.isEmpty(condition8))) { + if ("Y".equals(enabled) && "Y".equals(condition5) && (UtilValidate.isEmpty(condition6) || UtilValidate.isEmpty(condition7) || UtilValidate.isEmpty(condition8))) { String errMsg = "Please enter \"Greater price percen\" , \"Less price percent \" and \"Message\""; request.setAttribute("_ERROR_MESSAGE_", errMsg); return "error"; - } else if (enabled.equals("Y") && condition5.equals("N") && (UtilValidate.isNotEmpty(condition6) || UtilValidate.isNotEmpty(condition7) || UtilValidate.isNotEmpty(condition8))) { + } else if ("Y".equals(enabled) && "N".equals(condition5) && (UtilValidate.isNotEmpty(condition6) || UtilValidate.isNotEmpty(condition7) || UtilValidate.isNotEmpty(condition8))) { String errMsg = "Please enable rejection notification before."; request.setAttribute("_ERROR_MESSAGE_", errMsg); return "error"; } - if (enabled.equals("Y") && condition9.equals("Y") && (UtilValidate.isEmpty(condition10) || UtilValidate.isEmpty(condition11))) { + if ("Y".equals(enabled) && "Y".equals(condition9) && (UtilValidate.isEmpty(condition10) || UtilValidate.isEmpty(condition11))) { String errMsg = "Please enter \"Less price percent \" and \"Message\""; request.setAttribute("_ERROR_MESSAGE_", errMsg); return "error"; - } else if (enabled.equals("Y") && condition9.equals("N") && (UtilValidate.isNotEmpty(condition10) || UtilValidate.isNotEmpty(condition11))) { + } else if ("Y".equals(enabled) && "N".equals(condition9) && (UtilValidate.isNotEmpty(condition10) || UtilValidate.isNotEmpty(condition11))) { String errMsg = "Please enable rejection notification before."; request.setAttribute("_ERROR_MESSAGE_", errMsg); return "error"; Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreAutoPreferences.java Mon Oct 16 10:43:56 2017 @@ -933,7 +933,7 @@ public class EbayStoreAutoPreferences { Date creationDate = (Date) item.get("creationTime"); Timestamp creationTime = UtilDateTime.toTimestamp(creationDate); - if (creationTime.equals(lastestTime) && (item.get("listingType").toString().equals("Chinese"))) { + if (creationTime.equals(lastestTime) && ("Chinese".equals(item.get("listingType").toString()))) { Map<String, Object> serviceMap = new HashMap<String, Object>(); serviceMap.put("userLogin", userLogin); serviceMap.put("locale", locale); @@ -1241,22 +1241,22 @@ public class EbayStoreAutoPreferences { if ((bestOfferDetailsType != null) && (bestOfferCount > 0) && bestOfferIsEnabled.equals(true)) { //Get base price from kindOfPrice parameter Double doBasePrice = null; - if (priceType.equals("BUY_IT_NOW_PRICE")) { + if ("BUY_IT_NOW_PRICE".equals(priceType)) { doBasePrice = buyItNowPrice; - } else if (priceType.equals("START_PRICE")) { + } else if ("START_PRICE".equals(priceType)) { doBasePrice = itemBestOffer.getStartPrice().getValue(); - } else if (priceType.equals("RESERVE_PRICE")) { + } else if ("RESERVE_PRICE".equals(priceType)) { doBasePrice = itemBestOffer.getReservePrice().getValue(); - } else if (priceType.equals("RETAIL_PRICE")) { + } else if ("RETAIL_PRICE".equals(priceType)) { //ignore - } else if (priceType.equals("SELLER_COST")) { + } else if ("SELLER_COST".equals(priceType)) { List<GenericValue> supplierProduct = EntityQuery.use(delegator).from("SupplierProduct").where("productId", SKUItem).orderBy("availableFromDate DESC").queryList(); String lastPrice = supplierProduct.get(0).getString("lastPrice"); doBasePrice = Double.parseDouble(lastPrice); - } else if (priceType.equals("SECOND_CHANCE_PRICE")) { + } else if ("SECOND_CHANCE_PRICE".equals(priceType)) { VerifyAddSecondChanceItemCall verifyAddSecondChanceItemCall = new VerifyAddSecondChanceItemCall(apiContext); doBasePrice = verifyAddSecondChanceItemCall.getBuyItNowPrice().getValue(); - } else if (priceType.equals("STORE_PRICE")) { + } else if ("STORE_PRICE".equals(priceType)) { //ignore } BigDecimal basePrice = new BigDecimal(doBasePrice); @@ -1294,7 +1294,7 @@ public class EbayStoreAutoPreferences { String[] bestOfferIDs = { bestOfferID }; respondToBestOfferCall.setBestOfferIDs(bestOfferIDs); - if (rejectOffer.equals("Y")) { + if ("Y".equals(rejectOffer)) { if (offerQuantity > inventoryQuantityItem) { respondToBestOfferCall.setSellerResponse("Your order is more than inventory item's Buy-It-Now price."); respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); @@ -1304,7 +1304,7 @@ public class EbayStoreAutoPreferences { } String buyerMessage = bestOfferType.getBuyerMessage(); - if (ignoreOfferMessage.equals("Y") && UtilValidate.isNotEmpty(buyerMessage)) { + if ("Y".equals(ignoreOfferMessage) && UtilValidate.isNotEmpty(buyerMessage)) { GenericValue userOfferCheck = EntityQuery.use(delegator).from("EbayUserBestOffer").where("itemId", itemID, "userId", buyerUserID).queryOne(); if (UtilValidate.isEmpty(userOfferCheck)) { GenericValue ebayUserBestOffer = delegator.makeValue("EbayUserBestOffer"); @@ -1322,11 +1322,11 @@ public class EbayStoreAutoPreferences { acceptBestOfferIndexId.add(bestOfferID); String Quantity = String.valueOf(offerQuantity); acceptBestOfferIDs.put(bestOfferID, Quantity); - } else if ((cerrentPrice.compareTo(greaterPrice) >= 0) && (cerrentPrice.compareTo(lessThanPrice) <= 0 ) && rejectGreaterEnable.equals("Y")) { + } else if ((cerrentPrice.compareTo(greaterPrice) >= 0) && (cerrentPrice.compareTo(lessThanPrice) <= 0 ) && "Y".equals(rejectGreaterEnable)) { respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); respondToBestOfferCall.setSellerResponse(rejectGreaterMsg); respondToBestOfferCall.respondToBestOffer(); - } else if ((cerrentPrice.compareTo(rejectPrice) <= 0 && rejectLessEnable.equals("Y"))) { + } else if ((cerrentPrice.compareTo(rejectPrice) <= 0 && "Y".equals(rejectLessEnable))) { respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); respondToBestOfferCall.setSellerResponse(rejectLessMsg); respondToBestOfferCall.respondToBestOffer(); Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreCustomerService.java Mon Oct 16 10:43:56 2017 @@ -118,11 +118,11 @@ public class EbayStoreCustomerService { RespondToBestOfferCall respondToBestOfferCall = new RespondToBestOfferCall(apiContext); respondToBestOfferCall.setItemID(itemId); respondToBestOfferCall.setBestOfferIDs(bestOfferIDs); - if (contactStatus.equals("ACCEPT")) { + if ("ACCEPT".equals(contactStatus)) { respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.ACCEPT); respondToBestOfferCall.respondToBestOffer(); contactStatus = "FINISHED"; - } else if (contactStatus.equals("DECLINE")) { + } else if ("DECLINE".equals(contactStatus)) { respondToBestOfferCall.setBestOfferAction(BestOfferActionCodeType.DECLINE); respondToBestOfferCall.respondToBestOffer(); contactStatus = "FINISHED"; Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreHelper.java Mon Oct 16 10:43:56 2017 @@ -135,31 +135,31 @@ public class EbayStoreHelper { Map<String, Object> config = EbayHelper.buildEbayConfig(context, delegator); String siteId = (String)config.get("siteID"); if (siteId != null) { - if (siteId.equals("0")) return SiteCodeType.US; - if (siteId.equals("2")) return SiteCodeType.CANADA; - if (siteId.equals("3")) return SiteCodeType.UK; - if (siteId.equals("15")) return SiteCodeType.AUSTRALIA; - if (siteId.equals("16")) return SiteCodeType.AUSTRIA; - if (siteId.equals("23")) return SiteCodeType.BELGIUM_FRENCH; - if (siteId.equals("71")) return SiteCodeType.FRANCE; - if (siteId.equals("77")) return SiteCodeType.GERMANY; - if (siteId.equals("100")) return SiteCodeType.E_BAY_MOTORS; - if (siteId.equals("101")) return SiteCodeType.ITALY; - if (siteId.equals("123")) return SiteCodeType.BELGIUM_DUTCH; - if (siteId.equals("146")) return SiteCodeType.NETHERLANDS; - if (siteId.equals("189")) return SiteCodeType.SPAIN; - if (siteId.equals("193")) return SiteCodeType.SWITZERLAND; - if (siteId.equals("196")) return SiteCodeType.TAIWAN; - if (siteId.equals("201")) return SiteCodeType.HONG_KONG; - if (siteId.equals("203")) return SiteCodeType.INDIA; - if (siteId.equals("205")) return SiteCodeType.IRELAND; - if (siteId.equals("207")) return SiteCodeType.MALAYSIA; - if (siteId.equals("210")) return SiteCodeType.CANADA_FRENCH; - if (siteId.equals("211")) return SiteCodeType.PHILIPPINES; - if (siteId.equals("212")) return SiteCodeType.POLAND; - if (siteId.equals("216")) return SiteCodeType.SINGAPORE; - if (siteId.equals("218")) return SiteCodeType.SWEDEN; - if (siteId.equals("223")) return SiteCodeType.CHINA; + if ("0".equals(siteId)) return SiteCodeType.US; + if ("2".equals(siteId)) return SiteCodeType.CANADA; + if ("3".equals(siteId)) return SiteCodeType.UK; + if ("15".equals(siteId)) return SiteCodeType.AUSTRALIA; + if ("16".equals(siteId)) return SiteCodeType.AUSTRIA; + if ("23".equals(siteId)) return SiteCodeType.BELGIUM_FRENCH; + if ("71".equals(siteId)) return SiteCodeType.FRANCE; + if ("77".equals(siteId)) return SiteCodeType.GERMANY; + if ("100".equals(siteId)) return SiteCodeType.E_BAY_MOTORS; + if ("101".equals(siteId)) return SiteCodeType.ITALY; + if ("123".equals(siteId)) return SiteCodeType.BELGIUM_DUTCH; + if ("146".equals(siteId)) return SiteCodeType.NETHERLANDS; + if ("189".equals(siteId)) return SiteCodeType.SPAIN; + if ("193".equals(siteId)) return SiteCodeType.SWITZERLAND; + if ("196".equals(siteId)) return SiteCodeType.TAIWAN; + if ("201".equals(siteId)) return SiteCodeType.HONG_KONG; + if ("203".equals(siteId)) return SiteCodeType.INDIA; + if ("205".equals(siteId)) return SiteCodeType.IRELAND; + if ("207".equals(siteId)) return SiteCodeType.MALAYSIA; + if ("210".equals(siteId)) return SiteCodeType.CANADA_FRENCH; + if ("211".equals(siteId)) return SiteCodeType.PHILIPPINES; + if ("212".equals(siteId)) return SiteCodeType.POLAND; + if ("216".equals(siteId)) return SiteCodeType.SINGAPORE; + if ("218".equals(siteId)) return SiteCodeType.SWEDEN; + if ("223".equals(siteId)) return SiteCodeType.CHINA; } return SiteCodeType.US; } Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreInventoryServices.java Mon Oct 16 10:43:56 2017 @@ -282,7 +282,7 @@ public class EbayStoreInventoryServices } catch (SdkException e) { result = ServiceUtil.returnFailure(e.getMessage()); } - if (result.get("responseMessage") != null && result.get("responseMessage").equals("fail")) folderId = null; + if (result.get("responseMessage") != null && "fail".equals(result.get("responseMessage"))) folderId = null; result.put("folderId", folderId); Debug.logInfo("service return result "+ result, module); return result; Modified: ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java (original) +++ ofbiz/ofbiz-plugins/trunk/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStoreOrder.java Mon Oct 16 10:43:56 2017 @@ -223,7 +223,7 @@ public class EbayStoreOrder { contactMechId = EbayHelper.setShippingAddressContactMech(dispatcher, delegator, party, userLogin, context); String emailBuyer = context.get("emailBuyer").toString(); - if (!(emailBuyer.equals("") || emailBuyer.equalsIgnoreCase("Invalid Request"))) { + if (!(emailBuyer.equals("") || "Invalid Request".equalsIgnoreCase(emailBuyer))) { EbayHelper.setEmailContactMech(dispatcher, delegator, party, userLogin, context); } EbayHelper.setPhoneContactMech(dispatcher, delegator, party, userLogin, context); @@ -252,7 +252,7 @@ public class EbayStoreOrder { Debug.logInfo("Creating association to eBay buyer for party: " + partyId, module); EbayHelper.createEbayCustomer(dispatcher, partyId, context.get("ebayUserIdBuyer").toString(), context.get("eiasTokenBuyer").toString(), userLogin); String emailBuyer = context.get("emailBuyer").toString(); - if (UtilValidate.isNotEmpty(emailBuyer) && !emailBuyer.equalsIgnoreCase("Invalid Request")) { + if (UtilValidate.isNotEmpty(emailBuyer) && !"Invalid Request".equalsIgnoreCase(emailBuyer)) { Debug.logInfo("Creating new email for party: " + partyId, module); EbayHelper.createPartyEmail(dispatcher, partyId, emailBuyer, userLogin); } @@ -456,7 +456,7 @@ public class EbayStoreOrder { contactMechId = EbayHelper.setShippingAddressContactMech(dispatcher, delegator, party, userLogin, shippingAddressCtx); String emailBuyer = (String) context.get("emailBuyer"); - if (!(emailBuyer.equals("") || emailBuyer.equalsIgnoreCase("Invalid Request"))) { + if (!(emailBuyer.equals("") || "Invalid Request".equalsIgnoreCase(emailBuyer))) { EbayHelper.setEmailContactMech(dispatcher, delegator, party, userLogin, context); } EbayHelper.setPhoneContactMech(dispatcher, delegator, party, userLogin, shippingAddressCtx); @@ -486,7 +486,7 @@ public class EbayStoreOrder { Debug.logInfo("Creating association to eBay buyer for party: " + partyId, module); EbayHelper.createEbayCustomer(dispatcher, partyId, (String) context.get("ebayUserIdBuyer"), null, userLogin); String emailBuyer = (String) context.get("emailBuyer"); - if (UtilValidate.isNotEmpty(emailBuyer) && !emailBuyer.equalsIgnoreCase("Invalid Request")) { + if (UtilValidate.isNotEmpty(emailBuyer) && !"Invalid Request".equalsIgnoreCase(emailBuyer)) { Debug.logInfo("Creating new email for party: " + partyId, module); EbayHelper.createPartyEmail(dispatcher, partyId, emailBuyer, userLogin); } Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java (original) +++ ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java Mon Oct 16 10:43:56 2017 @@ -173,7 +173,7 @@ public class JanrainHelper { post.close(); Document tagXml = UtilXml.readXmlDocument(buf.toString()); Element response = tagXml.getDocumentElement(); - if (!response.getAttribute("stat").equals("ok")) { + if (!"ok".equals(response.getAttribute("stat"))) { throw new RuntimeException("Unexpected API error"); } return response; Modified: ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/LdapLoginWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/LdapLoginWorker.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/LdapLoginWorker.java (original) +++ ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/LdapLoginWorker.java Mon Oct 16 10:43:56 2017 @@ -154,7 +154,7 @@ public class LdapLoginWorker extends Log } } - if (result.equals("error")) { + if ("error".equals(result)) { boolean useOFBizLoginWhenFail = Boolean.getBoolean(UtilXml.childElementValue(rootElement, "UseOFBizLoginWhenLDAPFail", "false")); if (useOFBizLoginWhenFail) { return LoginWorker.login(request, response); Modified: ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java (original) +++ ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java Mon Oct 16 10:43:56 2017 @@ -64,7 +64,7 @@ public final class OFBizActiveDirectoryA env.put(Context.PROVIDER_URL, ldapURL); if (searchType == null || searchType.trim().equals("")) { env.put(Context.SECURITY_AUTHENTICATION, "none"); - } else if (searchType.trim().equals("login")) { + } else if ("login".equals(searchType.trim())) { env.put(Context.SECURITY_AUTHENTICATION, authenType); // specify the username for search String userDNForSearch = UtilXml.childElementValue(rootElement, "UserDNForSearch"); @@ -82,9 +82,9 @@ public final class OFBizActiveDirectoryA controls.setCountLimit(2); // ldap search scope String sub = UtilXml.childElementValue(rootElement, "Scope", "sub").toLowerCase().trim(); - if (sub.equals("sub")) { + if ("sub".equals(sub)) { controls.setSearchScope(SearchControls.SUBTREE_SCOPE); - } else if (sub.equals("one")) { + } else if ("one".equals(sub)) { controls.setSearchScope(SearchControls.ONELEVEL_SCOPE); } else { controls.setSearchScope(SearchControls.OBJECT_SCOPE); Modified: ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java (original) +++ ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java Mon Oct 16 10:43:56 2017 @@ -87,7 +87,7 @@ public final class OFBizCasAuthenticatio result = new InputStreamReader(conn.getInputStream(), "UTF-8"); reader = new BufferedReader(result); String oneline = reader.readLine(); - if (oneline != null && oneline.equals("yes")) { + if (oneline != null && "yes".equals(oneline)) { // the ticket is true username = reader.readLine().trim(); casLoggedIn = true; Modified: ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java (original) +++ ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java Mon Oct 16 10:43:56 2017 @@ -67,9 +67,9 @@ public final class OFBizLdapAuthenticati controls.setCountLimit(2); //TODO maybe properties... // ldap search scope String sub = UtilXml.childElementValue(rootElement, "Scope", "sub").toLowerCase().trim(); - if (sub.equals("sub")) { + if ("sub".equals(sub)) { controls.setSearchScope(SearchControls.SUBTREE_SCOPE); - } else if (sub.equals("one")) { + } else if ("one".equals(sub)) { controls.setSearchScope(SearchControls.ONELEVEL_SCOPE); } else { controls.setSearchScope(SearchControls.OBJECT_SCOPE); Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java Mon Oct 16 10:43:56 2017 @@ -73,9 +73,9 @@ public abstract class AbstractHtmlReport String action = getParamAction(request); if (action == null) action = ""; - if (action.equals("reportend") || action.equals("cancel")) { + if ("reportend".equals(action) || "cancel".equals(action)) { setParamAction("reportend"); - } else if (action.equals("reportupdate")) { + } else if ("reportupdate".equals(action)) { setParamAction("reportupdate"); } else { InterfaceReportThread thread = initializeThread(request, response, name); @@ -104,11 +104,11 @@ public abstract class AbstractHtmlReport public static String checkButton(HttpServletRequest request, HttpServletResponse response) { String action = request.getParameter("action"); if (ReportStringUtil.isNotEmpty(action)) { - if (action.equalsIgnoreCase("ok")) { + if ("ok".equalsIgnoreCase(action)) { request.removeAttribute(SESSION_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "ok"; - } else if (action.equalsIgnoreCase("cancel")) { + } else if ("cancel".equalsIgnoreCase(action)) { request.removeAttribute(SESSION_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "cancel"; @@ -116,7 +116,7 @@ public abstract class AbstractHtmlReport } action = request.getParameter("ok"); if (ReportStringUtil.isNotEmpty(action)) { - if (action.equalsIgnoreCase("ok")) { + if ("ok".equalsIgnoreCase(action)) { request.removeAttribute(SESSION_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "ok"; @@ -124,7 +124,7 @@ public abstract class AbstractHtmlReport } action = request.getParameter("cancel"); if (ReportStringUtil.isNotEmpty(action)) { - if (action.equalsIgnoreCase("cancel")) { + if ("cancel".equalsIgnoreCase(action)) { request.removeAttribute(SESSION_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "cancel"; Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlReport.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlReport.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlReport.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlReport.java Mon Oct 16 10:43:56 2017 @@ -82,11 +82,11 @@ public class PricatParseExcelHtmlReport public static String checkButton(HttpServletRequest request, HttpServletResponse response) { String action = request.getParameter("action"); if (ReportStringUtil.isNotEmpty(action)) { - if (action.equalsIgnoreCase("ok")) { + if ("ok".equalsIgnoreCase(action)) { request.removeAttribute(PRICAT_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "ok"; - } else if (action.equalsIgnoreCase("cancel")) { + } else if ("cancel".equalsIgnoreCase(action)) { request.removeAttribute(PRICAT_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "cancel"; @@ -94,7 +94,7 @@ public class PricatParseExcelHtmlReport } action = request.getParameter("ok"); if (ReportStringUtil.isNotEmpty(action)) { - if (action.equalsIgnoreCase("ok")) { + if ("ok".equalsIgnoreCase(action)) { request.removeAttribute(PRICAT_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "ok"; @@ -102,7 +102,7 @@ public class PricatParseExcelHtmlReport } action = request.getParameter("cancel"); if (ReportStringUtil.isNotEmpty(action)) { - if (action.equalsIgnoreCase("cancel")) { + if ("cancel".equalsIgnoreCase(action)) { request.removeAttribute(PRICAT_REPORT_CLASS); request.removeAttribute(DIALOG_URI); return "cancel"; @@ -125,10 +125,10 @@ public class PricatParseExcelHtmlReport String action = getParamAction(request); if (action == null) action = ""; - if (action.equals("reportend") || action.equals("cancel")) { + if ("reportend".equals(action) || "cancel".equals(action)) { setParamAction("reportend"); setDialogRealUri(request, dialogUri); - } else if (action.equals("reportupdate")) { + } else if ("reportupdate".equals(action)) { setParamAction("reportupdate"); } else { InterfaceReportThread thread = initializeThread(request, response, name); Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java (original) +++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/pricat/PricatParseExcelHtmlThread.java Mon Oct 16 10:43:56 2017 @@ -211,7 +211,7 @@ public class PricatParseExcelHtmlThread getReport().getReportUpdate(); String logFileName = getReport().closeLogFile(); if (UtilValidate.isNotEmpty(pricatParser)) { - if (thruReasonId.equals("EXCEL_IMPORT_SUCCESS") && pricatParser.hasErrorMessages()) { + if ("EXCEL_IMPORT_SUCCESS".equals(thruReasonId) && pricatParser.hasErrorMessages()) { thruReasonId = "EXCEL_IMPORT_QUEST"; } pricatParser.endExcelImportHistory(logFileName, thruReasonId); @@ -264,7 +264,7 @@ public class PricatParseExcelHtmlThread for (int i = 0; i < fileItems.size(); i++) { fi = fileItems.get(i); String fieldName = fi.getFieldName(); - if (fieldName.equals("filename")) { + if ("filename".equals(fieldName)) { pricatFi = fi; pricatBytes = pricatFi.get(); Path path = Paths.get(fi.getName()); Modified: ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java?rev=1812282&r1=1812281&r2=1812282&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java (original) +++ ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/control/OFBizSolrLoginWorker.java Mon Oct 16 10:43:56 2017 @@ -41,7 +41,7 @@ public class OFBizSolrLoginWorker extend */ public static String login(HttpServletRequest request, HttpServletResponse response) { String result = LoginWorker.login(request, response); - if (result.equals("success")) { + if ("success".equals(result)) { // send the redirect try { response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY); @@ -57,7 +57,7 @@ public class OFBizSolrLoginWorker extend public static String extensionCheckLogin(HttpServletRequest request, HttpServletResponse response) { String result = LoginWorker.extensionCheckLogin(request, response); - if (result.equals("success")) { + if ("success".equals(result)) { // send the redirect try { response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY); |
Free forum by Nabble | Edit this page |