Skip to content

Refactor SdsFilter for readabilty - #353

Merged
MartinWheelerMT merged 1 commit into
mainfrom
sds-filter-refactor-3
Sep 8, 2026
Merged

MartinWheelerMT merged 1 commit into
mainfrom
sds-filter-refactor-3

Conversation

@MartinWheelerMT

@MartinWheelerMT MartinWheelerMT commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

What

  • Moved SSP Header names into HeaderConstants.
  • Refactor SdsFilterTest to use headers from HeaderConstants
  • Renamed method to better reflect their usage.
  • Refactor code to use more modern switch with pattern matching to improve readability.
  • Refactor extractOdsCode to fluent methods.
  • Refactor appendSspHeaderWhenAbsent to handle the header array values better by using getFirst on the HttpHeader object.

Why

Refactor SdsFilter for readabilty

Type of Change

Please check the option(s) that apply.

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Internal change (non-breaking change with no effect on functionality affecting end users)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the Changelog with details of my change in the UNRELEASED section, if this change will affect end users

* Moved SSP Header names into `HeaderConstants`.
* Refactor `SdsFilterTest` to use headers from `HeaderConstants`
* Renamed method to better reflect their usage.
* Refactor code to use more modern switch with pattern matching to improve readability.
* Refactor `extractOdsCode` to fluent methods.
* Refactor `appendSspHeaderWhenAbsent` to handle the header array values better by using `getFirst` on the HttpHeader object.
@MartinWheelerMT
MartinWheelerMT requested a review from a team as a code owner September 8, 2026 13:08
@MartinWheelerMT
MartinWheelerMT enabled auto-merge (squash) September 8, 2026 13:09
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Images built and published to ECR using a Build Id of PR-411-a73c8bc

@MartinWheelerMT
MartinWheelerMT merged commit a675be6 into main Sep 8, 2026
7 checks passed
@MartinWheelerMT
MartinWheelerMT deleted the sds-filter-refactor-3 branch September 8, 2026 13:17
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