prosgarz35 commented on PR #3198:
URL: https://github.com/apache/james-project/pull/3198#issuecomment-5825814179

       Pushed another follow-up commit addressing the remaining lifecycle and 
sanitization nuances:
   
       1. **Identity-Aware Listener Unregistration**:
          - Added `default void 
unregisterIdle(EventListener.ReactiveEventListener listener)` to 
`SelectedMailbox`.
          - Implemented via `idleEventListener.compareAndSet(listener, null)` 
in `SelectedMailboxImpl`.
          - `cleanupIdle` now passes the registered listener instance, 
guaranteeing that a delayed cleanup of a previous IDLE iteration will never 
inadvertently clear an active listener from a subsequent IDLE session.
       2. **Strict ASCII Sanitization & Accurate Truncation**:
          - Constrained `sanitizeForDisplay()` strictly to printable ASCII 
characters (`c >= 32 && c < 127`), stripping Unicode noise as well as control 
codes.
          - Truncation (`...`) is now driven by an explicit `truncated` flag 
tracking whether valid printable output actually exceeded the 32-character 
limit, rather than relying on raw input length.
          - Added unit test cases to `IdleProcessorSanitizationTest` validating 
both strict ASCII filtering and non-truncation when control characters are 
stripped.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to