Skip to content

Commit

Permalink
fix: replace type casting with method
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian N committed Sep 6, 2024
1 parent 76280a7 commit 455fbd3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sfdx-source/apex-common/main/classes/fflib_SObjects.cls
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public virtual class fflib_SObjects
Set<String> result = new Set<String>();
for (SObject record : getRecords())
{
result.add((String) record.get(field));
result.add(String.valueOf(record.get(field)));
}
return result;
}
Expand Down Expand Up @@ -257,7 +257,7 @@ public virtual class fflib_SObjects
{
for (SObjectField field : fields)
{
if (String.isNotBlank((String) record.get(field))) continue;
if (String.isNotBlank(String.valueOf(record.get(field)))) continue;

result.add(record);
break;
Expand All @@ -279,7 +279,7 @@ public virtual class fflib_SObjects
Boolean allBlank = true;
for (SObjectField field : fields)
{
if (String.isNotBlank((String) record.get(field)))
if (String.isNotBlank(String.valueOf(record.get(field))))
{
allBlank = false;
break;
Expand Down Expand Up @@ -314,7 +314,7 @@ public virtual class fflib_SObjects
{
for (SObjectField field : fields)
{
if (String.isNotBlank((String) record.get(field)))
if (String.isNotBlank(String.valueOf(record.get(field))))
{
result.add(record);
break;
Expand All @@ -337,7 +337,7 @@ public virtual class fflib_SObjects
Boolean allNonBlank = true;
for (SObjectField field : fields)
{
if (String.isBlank((String) record.get(field)))
if (String.isBlank(String.valueOf(record.get(field))))
{
allNonBlank = false;
break;
Expand Down

0 comments on commit 455fbd3

Please sign in to comment.