Skip to content

Commit 9ead811

Browse files
committed
Consolidate when bind variables are being cleared
1 parent 5c2df04 commit 9ead811

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

force-app/repository/Repository.cls

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public virtual without sharing class Repository implements IRepository {
3232
this.logQuery('cursor query:\n' + finalQuery);
3333
Cursor cursor = new Cursor(finalQuery, this.bindVars, this.accessLevel);
3434
this.clearState();
35-
this.bindVars.clear();
3635
System.debug(System.LoggingLevel.FINER, 'number of results: ' + cursor.getNumRecords());
3736
return cursor;
3837
}
@@ -51,7 +50,6 @@ public virtual without sharing class Repository implements IRepository {
5150
this.bindVars,
5251
this.accessLevel
5352
);
54-
this.bindVars.clear();
5553
this.clearState();
5654
this.shouldAddChildFields = originalValue;
5755

@@ -247,6 +245,7 @@ public virtual without sharing class Repository implements IRepository {
247245
}
248246

249247
protected virtual void clearState() {
248+
this.clearBindVars();
250249
this.fieldToSortOrder.clear();
251250
this.limitAmount = null;
252251
}

0 commit comments

Comments
 (0)