Skip to content

Commit 0e8239c

Browse files
authored
Removed Unnecessary casts (#199)
* Removed Unnecessary casts Signed-off-by: Prashant Jain <[email protected]> * Removed Unnecessary casts Signed-off-by: Prashant Jain <[email protected]> * Removed Unnecessary casts Signed-off-by: Prashant Jain <[email protected]> --------- Signed-off-by: Prashant Jain <[email protected]>
1 parent 2541922 commit 0e8239c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

force-app/main/default/classes/main/cached-soql/CacheManagerTest.cls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private class CacheManagerTest {
3434
CacheManager.ApexTransaction.put('TestKey', 'Test Value');
3535

3636
// Verify
37-
Assert.areEqual('Test Value', (String) CacheManager.ApexTransaction.get('TestKey'), 'Cached value should be the same');
37+
Assert.areEqual('Test Value', CacheManager.ApexTransaction.get('TestKey'), 'Cached value should be the same');
3838
}
3939

4040
@IsTest
@@ -108,7 +108,7 @@ private class CacheManagerTest {
108108
CacheManager.SOQLOrgCache.put('TestKey', 'Test Value');
109109

110110
// Verify
111-
Assert.areEqual('Test Value', (String) CacheManager.SOQLOrgCache.get('TestKey'), 'Cached value should be the same');
111+
Assert.areEqual('Test Value', CacheManager.SOQLOrgCache.get('TestKey'), 'Cached value should be the same');
112112
}
113113

114114
@IsTest
@@ -182,7 +182,7 @@ private class CacheManagerTest {
182182
CacheManager.SOQLSessionCache.put('TestKey', 'Test Value');
183183

184184
// Verify
185-
Assert.areEqual('Test Value', (String) CacheManager.SOQLSessionCache.get('TestKey'), 'Cached value should be the same');
185+
Assert.areEqual('Test Value', CacheManager.SOQLSessionCache.get('TestKey'), 'Cached value should be the same');
186186
}
187187

188188
@IsTest

force-app/main/default/classes/main/standard-soql/SOQL.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ public virtual inherited sharing class SOQL implements Queryable {
995995
}
996996

997997
public List<AggregateResult> toAggregated() {
998-
return (List<AggregateResult>) this.toList();
998+
return this.toList();
999999
}
10001000

10011001
public List<AggregateResultProxy> toAggregatedProxy() {
@@ -2592,7 +2592,7 @@ public virtual inherited sharing class SOQL implements Queryable {
25922592
return this.getMockedAggregateProxy();
25932593
}
25942594

2595-
return new AggregateResultProxys().add((List<AggregateResult>) this.toList()).get();
2595+
return new AggregateResultProxys().add(this.toList()).get();
25962596
}
25972597

25982598
private List<AggregateResultProxy> getMockedAggregateProxy() {

force-app/main/default/classes/main/standard-soql/SOQL_Test.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4458,7 +4458,7 @@ private class SOQL_Test {
44584458
List<Account> accounts = insertAccountsWithParents();
44594459

44604460
// Test
4461-
Map<String, List<Account>> result = (Map<String, List<Account>>) SOQL.of(Account.SObjectType)
4461+
Map<String, List<Account>> result = SOQL.of(Account.SObjectType)
44624462
.whereAre(SOQL.Filter.with(Account.ParentId).isNotNull())
44634463
.toAggregatedMap('Parent.CreatedBy', User.Id);
44644464

0 commit comments

Comments
 (0)