Verwijder de dode overviewComponentFilterPatch #99

Closed
opened 2026-10-14 13:47:02 +02:00 by midas · 1 comment
Owner

Severity: low · Categorie: code-quality · Effort: S

Probleem

overviewComponentFilterPatch is unnamed, maar geen patch doet dependsOn erop. Hij wordt dus nooit toegepast. OVERVIEW_COMPONENT_FILTERS is leeg. De fingerprint OverviewComponentToViewData wordt daardoor ook nooit getest en kan ongemerkt verouderen.

Waar

Bewijs

U2-1 (patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt)

private static final ContentFilter[] OVERVIEW_COMPONENT_FILTERS = {
};
...
val overviewComponentFilterPatch = bytecodePatch(...)  // referenced by no other patch

X-contract-2 (patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt)

private static final ContentFilter[] OVERVIEW_COMPONENT_FILTERS = {
};
...
return ContentFilter.isDropped(OVERVIEW_COMPONENT_FILTERS, component) ? null : component;

X-arch-7 (patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt)

grep overviewComponentFilterPatch -> only its declaration (ContentFilterPatches.kt:62)
private static final ContentFilter[] OVERVIEW_COMPONENT_FILTERS = {
};

Impact

Code die bij elke app-update onderhouden moet worden, maar nooit draait.

Voorstel

Verwijder de patch, de fingerprint, ContentFilters.filterOverviewComponent en de lege array. Git bewaart ze. Werk de tabel in docs/apps/volkskrant.md bij.

Acceptatiecriteria

  • Er bestaat geen referentie meer naar OverviewComponentToViewData of filterOverviewComponent; build en tests zijn groen.

Code review @ 33e02db (2026-10-14) · findings: U2-1, X-contract-2, X-arch-7

**Severity:** low · **Categorie:** code-quality · **Effort:** S ## Probleem `overviewComponentFilterPatch` is unnamed, maar geen patch doet `dependsOn` erop. Hij wordt dus nooit toegepast. `OVERVIEW_COMPONENT_FILTERS` is leeg. De fingerprint `OverviewComponentToViewData` wordt daardoor ook nooit getest en kan ongemerkt verouderen. ## Waar - [`patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt#L61-86`](https://git.midasvo.nl/midas/midas-patches/src/commit/33e02db957a78f2d5443326cdd107a612e7c21a7/patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt#L61-L86) - [`patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/Fingerprints.kt#L34-52`](https://git.midasvo.nl/midas/midas-patches/src/commit/33e02db957a78f2d5443326cdd107a612e7c21a7/patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/Fingerprints.kt#L34-L52) - [`extensions/extension/src/main/java/nl/midasvo/extension/volkskrant/ContentFilters.java#L35-37, 57-65`](https://git.midasvo.nl/midas/midas-patches/src/commit/33e02db957a78f2d5443326cdd107a612e7c21a7/extensions/extension/src/main/java/nl/midasvo/extension/volkskrant/ContentFilters.java#L35-L37) - [`patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt#L60-86`](https://git.midasvo.nl/midas/midas-patches/src/commit/33e02db957a78f2d5443326cdd107a612e7c21a7/patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt#L60-L86) - [`extensions/extension/src/main/java/nl/midasvo/extension/volkskrant/ContentFilters.java#L35-37, 63-65`](https://git.midasvo.nl/midas/midas-patches/src/commit/33e02db957a78f2d5443326cdd107a612e7c21a7/extensions/extension/src/main/java/nl/midasvo/extension/volkskrant/ContentFilters.java#L35-L37) ## Bewijs _U2-1 (patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt)_ ```kotlin private static final ContentFilter[] OVERVIEW_COMPONENT_FILTERS = { }; ... val overviewComponentFilterPatch = bytecodePatch(...) // referenced by no other patch ``` _X-contract-2 (patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt)_ ```kotlin private static final ContentFilter[] OVERVIEW_COMPONENT_FILTERS = { }; ... return ContentFilter.isDropped(OVERVIEW_COMPONENT_FILTERS, component) ? null : component; ``` _X-arch-7 (patches/src/main/kotlin/nl/midasvo/patches/edition/contentfilters/ContentFilterPatches.kt)_ ```kotlin grep overviewComponentFilterPatch -> only its declaration (ContentFilterPatches.kt:62) private static final ContentFilter[] OVERVIEW_COMPONENT_FILTERS = { }; ``` ## Impact Code die bij elke app-update onderhouden moet worden, maar nooit draait. ## Voorstel Verwijder de patch, de fingerprint, `ContentFilters.filterOverviewComponent` en de lege array. Git bewaart ze. Werk de tabel in `docs/apps/volkskrant.md` bij. ## Acceptatiecriteria - [ ] Er bestaat geen referentie meer naar `OverviewComponentToViewData` of `filterOverviewComponent`; build en tests zijn groen. _Code review @ 33e02db (2026-10-14) · findings: U2-1, X-contract-2, X-arch-7_
Author
Owner

Opgelost in PR #114, gemerged in dev en uitgebracht in v1.10.0 (onderdeel van #105).

Opgelost in PR #114, gemerged in dev en uitgebracht in v1.10.0 (onderdeel van #105).
midas closed this issue 2026-10-17 21:22:59 +02:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
midas/midas-patches#99
No description provided.