Skip to content
Open
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 @@ -79,8 +79,7 @@ public with sharing class ADDR_GoogleGeoAPI_Validator implements ADDR_IValidator

this.checked_addresses = new List<Address__c>();

String endPoint = settings.Address_Verification_Endpoint__c != null ?
settings.Address_Verification_Endpoint__c : getDefaultURL();
String endPoint = settings?.Address_Verification_Endpoint__c.Address_Verification_Endpoint__c;

if (!addresses.isEmpty()){
for (Address__c a : addresses) {
Expand Down
6 changes: 3 additions & 3 deletions force-app/main/default/classes/BDI_DataImport_TEST.cls
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ public with sharing class BDI_DataImport_TEST {
Contact2_Firstname__c = firstname2,
Contact2_Lastname__c = lastname2,
Contact2_Personal_Email__c = (lastname2 == null ? null : firstname2 + '@' + lastname2 + '.com'),
Home_City__c = (address.MailingCity__c == null ? null : address.MailingCity__c),
Home_State_Province__c = (address.MailingState__c == null ? null : address.MailingState__c),
Home_Country__c = (address.MailingCountry__c == null ? null : address.MailingCountry__c)
Home_City__c = (address?.MailingCity__c.MailingCity__c),
Home_State_Province__c = (address?.MailingState__c.MailingState__c),
Home_Country__c = (address?.MailingCountry__c.MailingCountry__c)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ public with sharing class BGE_DataImportBatchEntry_CTRL {
Decimal totalAmount = 0;

for (DataImportRow dataImportRow: dataImportRows) {
totalAmount+= dataImportRow.record.Donation_Amount__c == null
? 0
: dataImportRow.record.Donation_Amount__c;
totalAmount+= dataImportRow.record?.Donation_Amount__c.Donation_Amount__c;
}
return totalAmount;
}
Expand All @@ -120,9 +118,7 @@ public with sharing class BGE_DataImportBatchEntry_CTRL {
FROM DataImport__c
WHERE NPSP_Data_Import_Batch__c =: batchId
]) {
totalAmount+= dataImport.Donation_Amount__c == null
? 0
: dataImport.Donation_Amount__c;
totalAmount+= dataImport?.Donation_Amount__c.Donation_Amount__c;
}
return totalAmount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class CMT_FilterRuleEvaluation_SVC {
// Build a unique key of a concatenation of the Id's of all the detail rows.
String cacheKey = filterGroupId + '.';
for (SObject record : detailRows) {
String recordId = (record.Id == null ? (nullIdRowCounter++).format() : record.Id);
String recordId = (record?.Id.Id);
cacheKey += recordId;
}
// If this set of detail rows has already been evaluated for this filter group, return the cached result
Expand All @@ -101,7 +101,7 @@ public class CMT_FilterRuleEvaluation_SVC {
List<CMT_FilterRule> rulesToEvaluate = mapOfFilterRulesByGroupId.get(filterGroupId);

for (SObject record : detailRows) {
String recordId = (record.Id == null ? (nullIdRowCounter++).format() : record.Id);
String recordId = (record?.Id.Id);
SObjectType objType = record.getSObjectType();
for (CMT_FilterRule rule : rulesToEvaluate) {
if (objType == rule.getObjectType()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public with sharing class CON_DeleteContactOverride_CTRL {
********************************************************************************************************/
public void validate() {
CDL_CascadeDeleteLookups.Error error = new CDL_CascadeDeleteLookups.Error(
(contactToDelete.Firstname != null ? contactToDelete.Firstname : '') + ' ' + contactToDelete.LastName);
(contactToDelete?.Firstname.Firstname) + ' ' + contactToDelete.LastName);

for (Opportunity currentOpportunity : relatedOpportunities) {
if (currentOpportunity.IsClosed && currentOpportunity.IsWon) {
Expand Down
2 changes: 1 addition & 1 deletion force-app/main/default/classes/CRLP_Query_SEL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public inherited sharing class CRLP_Query_SEL {
String fieldName = rule.Field__r.QualifiedApiName;
if (countOfRuleUsage.containsKey(fieldName)) {
countOfRuleUsage.put(fieldName, countOfRuleUsage.get(fieldName)+1);
String constantVal = (rule.Constant__c == null ? '' : rule.Constant__c);
String constantVal = (rule?.Constant__c.Constant__c);

// Next compare the Constant value for each of the rules. If the value is the same across
// each of the Rules for this field, the value will is stored in the targetFieldAndConstant map.
Expand Down
3 changes: 1 addition & 2 deletions force-app/main/default/classes/CRLP_Rollup.cls
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,7 @@ public class CRLP_Rollup {

public Rollupmdt(Rollup__mdt rlp) {
operation = rlp.Operation__c;
timeBoundOperationType = (rlp.Time_Bound_Operation_Type__c != null ? rlp.Time_Bound_Operation_Type__c :
CRLP_Operation.TimeBoundOperationType.All_Time.name());
timeBoundOperationType = (rlp?.Time_Bound_Operation_Type__c.Time_Bound_Operation_Type__c);
summaryObject = rlp.Summary_Object__r.QualifiedApiName;
summaryField = rlp.Summary_Field__r.QualifiedApiName;
detailObject = rlp.Detail_Object__r.QualifiedApiName;
Expand Down
2 changes: 1 addition & 1 deletion force-app/main/default/classes/MTCH_FindGifts_CTRL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public with sharing class MTCH_FindGifts_CTRL {

oppQuery += ' FROM Opportunity WHERE Id = :oppId';
opp = Database.query(oppQuery);
matchingGiftPercent = opp.Account.Matching_Gift_Percent__c == null ? 100 : opp.Account.Matching_Gift_Percent__c;
matchingGiftPercent = opp.Account?.Matching_Gift_Percent__c.Matching_Gift_Percent__c;

// if the opp Amount is null, treat as $0 and still load the page.
if (opp.Amount == null) {
Expand Down
8 changes: 4 additions & 4 deletions force-app/main/default/classes/NPSP_Address.cls
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ public inherited sharing class NPSP_Address implements IAddress {
strCleanup(address.MailingPostalCode__c) +
strCleanup(address.MailingCountry__c) +
strCleanup(address.Address_Type__c) +
(address.Seasonal_Start_Day__c != null ? address.Seasonal_Start_Day__c : '') +
(address.Seasonal_Start_Month__c != null ? address.Seasonal_Start_Month__c : '') +
(address.Seasonal_End_Day__c != null ? address.Seasonal_End_Day__c : '') +
(address.Seasonal_End_Month__c != null ? address.Seasonal_End_Month__c : '');
(address?.Seasonal_Start_Day__c.Seasonal_Start_Day__c) +
(address?.Seasonal_Start_Month__c.Seasonal_Start_Month__c) +
(address?.Seasonal_End_Day__c.Seasonal_End_Day__c) +
(address?.Seasonal_End_Month__c.Seasonal_End_Month__c);
return strKey;
}

Expand Down
2 changes: 1 addition & 1 deletion force-app/main/default/classes/PS_GatewayService.cls
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public with sharing class PS_GatewayService {
public GatewayTemplateSetting() {}
public GatewayTemplateSetting(ResponseBody rb) {
this.id = rb.id;
this.gatewayName = rb.alias == null ? rb.vendorName : rb.alias;
this.gatewayName = rb?.alias.alias;
this.isDefault = false;
this.isCreditCardEnabled = false;
this.isACHEnabled = false;
Expand Down
4 changes: 1 addition & 3 deletions force-app/main/default/classes/RD2_CommitmentService.cls
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ public without sharing class RD2_CommitmentService {
}

private Id getRecordId(npe03__Recurring_Donation__c rd) {
Id recordId = rd.Id != null
? rd.Id
: rd.npe03__Contact__c != null
Id recordId = rd?.Id.Id
? rd.npe03__Contact__c
: rd.npe03__Organization__c;
return recordId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ public with sharing class RD2_VisualizeScheduleController {
*/
@AuraEnabled
public List<Object> getRecords() {
return this.records == null ? new List<Object>() : this.records;
return this?.records.records;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public class RLLP_OppPartialSoftCreditRollup {
* @return Contact The updated Contact record
*/
private static Contact countPartialSoftCredits(Contact c, Partial_Soft_Credit__c psc, Date currentYearStart) {
decimal amount = psc.Amount__c != null ? psc.Amount__c : 0;
decimal amount = psc?.Amount__c.Amount__c;
string pscCurrencyIsoCode = RLLP_OppRollup_UTIL.isMultiCurrency() ? (string)psc.get('CurrencyIsoCode') : '';
return countSoftCreditsSharedLogic(c, amount, pscCurrencyIsoCode, psc.Opportunity__r.CloseDate, currentYearStart);
}
Expand All @@ -201,7 +201,7 @@ public class RLLP_OppPartialSoftCreditRollup {
* @return Contact The updated Contact record
*/
private static Contact countOpportunityContactRoles(Contact c, OpportunityContactRole ocr, Date currentYearStart) {
decimal amount = ocr.Opportunity.Amount != null ? ocr.Opportunity.Amount : 0;
decimal amount = ocr.Opportunity?.Amount.Amount;
string oppCurrencyIsoCode = RLLP_OppRollup_UTIL.isMultiCurrency() ? (string)ocr.Opportunity.get('CurrencyIsoCode') : '';
return countSoftCreditsSharedLogic(c, amount, oppCurrencyIsoCode, ocr.Opportunity.CloseDate, currentYearStart);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ private class STG_PanelRDHealthCheck_TEST {
private static String getValidationResults(STG_PanelHealthCheck_CTRL ctrl) {
String results = '';
for (STG_PanelHealthCheck_CTRL.DetectResult dr : ctrl.listDR) {
results += dr.strStatus + ': ' + (dr.strDetails != null ? dr.strDetails : dr.strSolution) + '\n';
results += dr.strStatus + ': ' + (dr?.strDetails.strDetails) + '\n';
}
return results;
}
Expand Down