Skip to content

Commit

Permalink
Make sure method return non-null values
Browse files Browse the repository at this point in the history
  • Loading branch information
wimvelzeboer committed May 27, 2022
1 parent a64b4a2 commit 4c3f574
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sfdx-source/apex-common/main/classes/fflib_SObjects.cls
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ public virtual class fflib_SObjects
Set<Id> result = new Set<Id>();
for (SObject record : getRecords())
{
if (record.get(field) == null) continue;

result.add((Id) record.get(field));
}
return result;
Expand All @@ -182,6 +184,8 @@ public virtual class fflib_SObjects
Set<String> result = new Set<String>();
for (SObject record : getRecords())
{
if (record.get(field) == null) continue;

result.add((String) record.get(field));
}
return result;
Expand Down

0 comments on commit 4c3f574

Please sign in to comment.