From c593f4056c33a31069ac70feda2291fa56d1765c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Sat, 11 Jul 2026 15:09:30 +0200 Subject: [PATCH] fix: make isExtensionUpdateRequired uniformly public across the helper hierarchy AbstractCheckExtensionHelper declares isExtensionUpdateRequired as a protected hook, but five of its six subclasses have overridden it as public since the initial Check contribution, and CheckTocExtensionTest and CheckContextsExtensionTest unit-test the hook directly on injected helper instances. Widen the parent declaration and the one remaining protected override (CheckMarkerHelpExtensionHelper) so the whole hierarchy carries one visibility. Widening was chosen over narrowing deliberately: narrowing the public outliers would break the tests' direct calls and force test-only re-widening subclasses, whereas public matches how the hierarchy has actually been used since 2016. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_018ANGM7L3BaEGfGUmPVKRt4 --- .../ddk/check/ui/builder/util/AbstractCheckExtensionHelper.java | 2 +- .../check/ui/builder/util/CheckMarkerHelpExtensionHelper.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/AbstractCheckExtensionHelper.java b/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/AbstractCheckExtensionHelper.java index bdbab27825..72a352d87c 100644 --- a/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/AbstractCheckExtensionHelper.java +++ b/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/AbstractCheckExtensionHelper.java @@ -143,7 +143,7 @@ protected T getFromServiceProvider(final Class type, final URI uri) { * in. */ @SuppressWarnings("PMD.UnusedFormalParameter") - protected boolean isExtensionUpdateRequired(final CheckCatalog catalog, final IPluginExtension extension, final Iterable elements) { + public boolean isExtensionUpdateRequired(final CheckCatalog catalog, final IPluginExtension extension, final Iterable elements) { return extension.getPoint().equals(getExtensionPointId()); // if points are different, given extension must not be updated } diff --git a/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/CheckMarkerHelpExtensionHelper.java b/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/CheckMarkerHelpExtensionHelper.java index e4a7b46152..055aeee329 100644 --- a/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/CheckMarkerHelpExtensionHelper.java +++ b/com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/CheckMarkerHelpExtensionHelper.java @@ -138,7 +138,7 @@ public String apply(final XIssueExpression input) { } @Override - protected boolean isExtensionUpdateRequired(final CheckCatalog catalog, final IPluginExtension extension, final Iterable elements) { + public boolean isExtensionUpdateRequired(final CheckCatalog catalog, final IPluginExtension extension, final Iterable elements) { // TODO should check if this check is too expensive; consider rewriting contents instead if (!super.isExtensionUpdateRequired(catalog, extension, elements)) { return false;