Repository navigation
v4.19.2 - Optimized Data Masking
Thanks to @EnglundAndreas for reporting issue #639 and thanks to @anthonygiuliano for fixing it in PR #959 🥳
Core Unlocked Package Changes
Fixed #639 System.LimitException: Regex too complicated when LogEntryEventBuilder.applyDataMaskRules processes long strings (~35K+ chars).
The existing chunking logic in applyDataMaskRuleToLongLine had three issues that this release addresses:
- Longest-match deduplication: When two overlapping chunks find a match at the same start position, the old code kept whichever was found first (shorter context). Now keeps the longest match, since the chunk with more trailing context produces the most accurate result.
- Sorted left-to-right processing: The old code processed matches in discovery order across chunks, which isn't guaranteed to be left-to-right. Now explicitly sorts start positions and skips matches consumed by previous replacements.
- Single-pass
expandReplacement: The old iterativeString.replace('$' + i, groups[i])reinterpreted$Npatterns inside captured group values (e.g., if group 1 capturedPRICE:$3, the$3would be replaced with group 3's value). The new implementation scans the replacement template left-to-right, only interpreting$Nin the template itself — matching Java'sMatcher.appendReplacementbehavior.
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.19.1...v4.19.2
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04tg7000000HNrRAAW - Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04tg7000000HNrRAAW
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04tg7000000HNrRAAW