Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,8 @@ public static Map<String, Object> giftCertificatePurchase(DispatchContext dctx,
String orderEmails = orh.getOrderEmailString();
String copyMeField = giftCertSettings.getString("purchSurveyCopyMe");
String copyMeResp = copyMeField != null ? (String) answerMap.get(copyMeField) : null;
boolean copyMe = (UtilValidate.isNotEmpty(copyMeField)
&& UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp)) ? true : false;
boolean copyMe = UtilValidate.isNotEmpty(copyMeField)
&& UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp);

int qtyLoop = quantity.intValue();
for (int i = 0; i < qtyLoop; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ private static RitaApi getApi(Properties props) {
} catch (RuntimeException e) {
Debug.logError(e, MODULE);
}
boolean ssl = "Y".equals(props.getProperty("ssl", "N")) ? true : false;
boolean ssl = "Y".equals(props.getProperty("ssl", "N"));

RitaApi api = null;
if (port > 0 && host != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ public static Map<String, Object> giftCardPurchase(DispatchContext dctx, Map<Str
String orderEmails = orh.getOrderEmailString();
String copyMeField = EntityUtilProperties.getPropertyValue(paymentConfig, "payment.giftcert.purchase.survey.copyMe", delegator);
String copyMeResp = copyMeField != null ? (String) answerMap.get(copyMeField) : null;
boolean copyMe = (UtilValidate.isNotEmpty(copyMeField)
&& UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp)) ? true : false;
boolean copyMe = UtilValidate.isNotEmpty(copyMeField)
&& UtilValidate.isNotEmpty(copyMeResp) && "true".equalsIgnoreCase(copyMeResp);

int qtyLoop = quantity.intValue();
for (int i = 0; i < qtyLoop; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ public static Map<String, Object> updateOrRemove(DispatchContext dctx, Map<Strin
}
pkFields.put(fieldName, fieldValue);
}
boolean doLink = (action != null && "Y".equalsIgnoreCase(action)) ? true : false;
boolean doLink = "Y".equalsIgnoreCase(action);
if (Debug.infoOn()) {
Debug.logInfo("in updateOrRemove, context:" + context, MODULE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args) {
}
final String thisContentId = (String) templateRoot.get("contentId");
final String xmlEscape = (String) templateRoot.get("xmlEscape");
final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId) ? true : false;
final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId);
if (Debug.verboseOn()) {
Debug.logVerbose("in Render(0), directAssocMode ." + directAssocMode, MODULE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args) {
if (Debug.infoOn()) {
Debug.logInfo("in Render(0), thisSubContentId ." + thisContentId, MODULE);
}
final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId) ? true : false;
final boolean directAssocMode = UtilValidate.isNotEmpty(thisContentId);
if (Debug.infoOn()) {
Debug.logInfo("in Render(0), directAssocMode ." + directAssocMode, MODULE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args) {
String strNullThruDatesOnly = (String) templateRoot.get("nullThruDatesOnly");
Boolean nullThruDatesOnly = (strNullThruDatesOnly != null && "true".equalsIgnoreCase(strNullThruDatesOnly)) ? Boolean.TRUE : Boolean.FALSE;
String thisSubContentId = (String) templateRoot.get("subContentId");
final boolean directAssocMode = UtilValidate.isNotEmpty(thisSubContentId) ? true : false;
final boolean directAssocMode = UtilValidate.isNotEmpty(thisSubContentId);
GenericValue val = null;
try {
val = ContentWorker.getCurrentContent(delegator, trail, userLogin, templateRoot, nullThruDatesOnly, contentAssocPredicateId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static Map<String, Object> checkRoutingTaskAssoc(DispatchContext ctx, Map
Timestamp thruDate = (Timestamp) context.get("thruDate");
String create = (String) context.get("create");

boolean createProcess = (create != null && "Y".equals(create)) ? true : false;
boolean createProcess = "Y".equals(create);
List<GenericValue> listRoutingTaskAssoc = null;

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ public static String determineNextFinalizeStep(HttpServletRequest request, HttpS
requireTerm = requireTermStr == null || "true".equalsIgnoreCase(requireTermStr);
}
requireAdditionalParty = requireAdditionalPartyStr == null || "true".equalsIgnoreCase(requireAdditionalPartyStr);
isSingleUsePayment = singleUsePaymentStr != null && "Y".equalsIgnoreCase(singleUsePaymentStr) ? true : false;
isSingleUsePayment = "Y".equalsIgnoreCase(singleUsePaymentStr);
}

boolean shippingAddressSet = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ public static String restoreAutoSaveList(HttpServletRequest request, HttpServlet

// check to see if we are okay to load this list
java.sql.Timestamp lastLoad = cart.getLastListRestore();
boolean okayToLoad = autoSaveListId == null ? false : (lastLoad == null ? true : false);
boolean okayToLoad = autoSaveListId != null && lastLoad == null;
if (!okayToLoad && lastLoad != null) {
GenericValue shoppingList = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ public static Map<String, Object> getPartyContactMechValueMaps(DispatchContext c
}
}
Boolean bShowOld = (Boolean) context.get("showOld");
boolean showOld = (bShowOld != null && bShowOld) ? true : false;
boolean showOld = Boolean.TRUE.equals(bShowOld);
String contactMechTypeId = (String) context.get("contactMechTypeId");
List<Map<String, Object>> valueMaps = ContactMechWorker.getPartyContactMechValueMaps(delegator, partyId, showOld, contactMechTypeId);
result.put("valueMaps", valueMaps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2262,8 +2262,8 @@ public static Map<String, Object> findPartyById(DispatchContext ctx, Map<String,
String searchPartyFirstContext = (String) context.get("searchPartyFirst");
String searchAllIdContext = (String) context.get("searchAllId");

boolean searchPartyFirst = UtilValidate.isNotEmpty(searchPartyFirstContext) && "N".equals(searchPartyFirstContext) ? false : true;
boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext) ? true : false;
boolean searchPartyFirst = !UtilValidate.isNotEmpty(searchPartyFirstContext) || !"N".equals(searchPartyFirstContext);
boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext);

GenericValue party = null;
List<GenericValue> partiesFound = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1319,8 +1319,8 @@ public static Map<String, Object> findProductById(DispatchContext ctx, Map<Strin
String searchProductFirstContext = (String) context.get("searchProductFirst");
String searchAllIdContext = (String) context.get("searchAllId");

boolean searchProductFirst = UtilValidate.isNotEmpty(searchProductFirstContext) && "N".equals(searchProductFirstContext) ? false : true;
boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext) ? true : false;
boolean searchProductFirst = !UtilValidate.isNotEmpty(searchProductFirstContext) || !"N".equals(searchProductFirstContext);
boolean searchAllId = UtilValidate.isNotEmpty(searchAllIdContext) && "Y".equals(searchAllIdContext);

GenericValue product = null;
List<GenericValue> productsFound = null;
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ checkstyle {
// 'checkstyle' tool present in the framework and in the official
// plugins.
tasks.checkstyleMain.maxErrors = 0
// Increase memory for checkstyleMain required for Gradle 8+.
tasks.checkstyleMain.maxHeapSize = '1g'
// Currently there are no errors so we can show new one when they appear
showViolations = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public IntegerToBoolean() {

@Override
public Boolean convert(Integer obj) throws ConversionException {
return obj == 0 ? false : true;
return obj != 0;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ public static Map<String, Object> sendMail(DispatchContext ctx, Map<String, ? ex
socketFactoryFallback = EntityUtilProperties.getPropertyValue("general", "mail.smtp.socketFactory.fallback", "false", delegator);
}
if (sendPartial == null) {
sendPartial = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.sendpartial", "true", delegator)
? true : false;
sendPartial = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.sendpartial", "true", delegator);
}
if (isStartTLSEnabled == null) {
isStartTLSEnabled = EntityUtilProperties.propertyValueEqualsIgnoreCase("general", "mail.smtp.starttls.enable", "true", delegator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ public void setChanged() {
* @return the boolean
*/
public boolean originalDbValuesAvailable() {
return this.originalDbValues != null ? true : false;
return this.originalDbValues != null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5485,9 +5485,9 @@ public TextFindField(Element element, ModelFormField modelFormField) {
this.defaultOption = UtilProperties.getPropertyValue("widget", "widget.form.defaultTextFindOption", "contains");
}
this.hideIgnoreCase = "true".equals(element.getAttribute("hide-options"))
|| "ignore-case".equals(element.getAttribute("hide-options")) ? true : false;
|| "ignore-case".equals(element.getAttribute("hide-options"));
this.hideOptions = "true".equals(element.getAttribute("hide-options"))
|| "options".equals(element.getAttribute("hide-options")) ? true : false;
|| "options".equals(element.getAttribute("hide-options"));
this.ignoreCase = "true".equals(element.getAttribute("ignore-case"));
}

Expand Down
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
39 changes: 23 additions & 16 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 24 additions & 34 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading