Skip to content

Conversation

@jamessimone
Copy link
Contributor

  • Update FinalizerHandler to use better sorting implementation
  • Adds updated lint/PMD scanning to pre-commit hooks
  • Fixes misspelled casing for several Boolean parameters

DML_Finalizer__mdt first,
DML_Finalizer__mdt second
) {
Integer difference = (first.Order__c - second.Order__c).intValue();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order__c has some decimal places defined with the intention that people can slot actions between each other without needing to update all subsequent Order__c values.

Perhaps that was not the proper design in hindsight as all are eventually sequenced so they map to non-negative integers anyway. Regardless, if a decimal place is used, then integer rounding can lose some fidelity in the ordering.

I think we need to keep (first.Order__c - second.Order__c) as a decimal for now, and potentially revisit the precision on Order__c as a new breaking change in a major package version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah, great call - wasn't aware of that level of precision, but in retrospect it makes sense! I will back out this particular change, thanks for the catch

Copy link
Owner

@mitchspano mitchspano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mitchspano mitchspano merged commit 0ab5fa8 into mitchspano:main Nov 13, 2025
1 of 2 checks passed
@jamessimone jamessimone deleted the update-finalizers branch November 13, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants