From 455fbd307bd165360d8a2b4c18a09ed6e6af03cf Mon Sep 17 00:00:00 2001 From: Cristian N Date: Fri, 6 Sep 2024 14:11:58 +0200 Subject: [PATCH] fix: replace type casting with method --- .../apex-common/main/classes/fflib_SObjects.cls | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls index 95c48ccf017..8de2bdbd1f3 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls +++ b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls @@ -182,7 +182,7 @@ public virtual class fflib_SObjects Set result = new Set(); for (SObject record : getRecords()) { - result.add((String) record.get(field)); + result.add(String.valueOf(record.get(field))); } return result; } @@ -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; @@ -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; @@ -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; @@ -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;