Skip to content

Commit

Permalink
Fixed null pointer bug in FLS checking
Browse files Browse the repository at this point in the history
Reversed accidental commit
  • Loading branch information
rob-baillie-ortoo committed Dec 9, 2021
1 parent 81cf3ac commit a09bb9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class ortoo_FabricatedSObjectRegister {

public void persist()
{
persist( (ortoo_SObjectUnitOfWork)Application.UNIT_OF_WORK.newInstance( getOrderOfInserts(), new SecureDml() ) );
persist( (ortoo_SObjectUnitOfWork)Application.UNIT_OF_WORK.newInstance( getOrderOfInserts(), new UnsecureDml() ) );
}

@testVisible
Expand Down
2 changes: 1 addition & 1 deletion framework/main/default/classes/SecureDml.cls
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public inherited sharing class SecureDml extends fflib_SobjectUnitOfWork.SimpleD
SObjectAccessDecision securityDecision = Security.stripInaccessible( mode, objList );
Set<String> removedFields = securityDecision.getRemovedFields().get( sobjectTypeName );

if ( ! removedFields.isEmpty() )
if ( removedFields != null && !removedFields.isEmpty() )
{
List<Sobject> strippedRecords = securityDecision.getRecords();
removedFields = unstripAccessible( removedFields, objList, strippedRecords );
Expand Down

0 comments on commit a09bb9f

Please sign in to comment.