feat(archunit-rules): combined NoBlanketCatch evaluate() single-scan API + fix javadoc -1.1 warning (#332 W1) #17

Merged
hibryda merged 3 commits from feat/archunit-noblanketcatch-combined-eval into main 2026-05-31 00:03:57 +02:00
Owner

#332 W1 follow-up — archunit-rules two small improvements

Project im2be-platform-libs • Module archunit-rules (+ parent pom) • Base main#332 W1 follow-up • 2026-05-30

TL;DR

CONDITIONAL_APPROVE — additive combined evaluate() single-scan API (resolves the long-standing "double evaluation" minor flagged every reviewer round) + pins maven-javadoc-plugin to 3.11.2 to drop the spurious -1.1 switch warning (a 3.11.3 regression). Zero warnings; no API broken; no version bump.

Summary

Two independent improvements, one PR, two commits. (1) Adds NoBlanketCatchArchTest.evaluate(JavaClasses) → WarnResult(count, report) that scans the rule ONCE and returns both the ratchet count and the warn-mode report — the clean fix every PR-reviewer round suggested for the double evaluation in warn-mode tests. The legacy evaluateForWarning + violationCount are kept unchanged (the 7 merged services depend on them; purely additive). (2) Fixes the pre-existing [WARNING] Javadoc 1.4+ doesn't support the -1.1 switch anymore emitted on mvn install (javadoc:jar is bound to package). Reviewed commits: 1b8bbf0 (API) + 7e48163 (javadoc pin).

Findings (addressed)

# Severity File:loc Title Resolution
1 MINOR NoBlanketCatchArchTest.java Rule evaluated twice per warn-test New record WarnResult(int count, String report) + evaluate() single-scan method; Javadoc steers new callers to it; legacy methods retained for back-compat
2 MINOR pom.xml (parent, maven-javadoc-plugin) Spurious -1.1 switch warning breaks the zero-warning gate (rule 62) Pin plugin to 3.11.2 — last release before the 3.11.3 regression; no suppression knob exists in 3.11.3

Task-1 self-test: NoBlanketCatchSelfTest.evaluateReturnsCombinedCountAndReport — negative package → count==3 + report contains "catches Exception"; positive package → count==0 + report isEmpty(). Both branches pinned via .contain(...) to guard a vacuous pass.

Task-2 root cause (rule 61, doc-grounded): maven-javadoc-plugin 3.11.3 (resolved from the spring-boot-starter-parent 3.5.14 BOM) unconditionally logs the -1.1 switch warning during argument construction even though old=false and <release>17> is set — confirmed a regression (absent in 3.11.2) per the Maven users mailing-list thread. No config knob suppresses it in 3.11.3 (tested <release>, <detectJavaApiLink>false>, <detectOfflineLinks>false>, <javadocVersion> — none work); the plugin main-branch fix is unreleased. 3.11.2 is the last clean, behaviour-compatible release. The pin carries a remove-once-fixed note.

Verification

mvn -pl archunit-rules test            -> Tests run: 9 (NoBlanketCatchSelfTest 7, was 6), 0 fail/err, BUILD SUCCESS, 0 [WARNING]/[ERROR]
mvn clean install (all modules)        -> BUILD SUCCESS;  grep -c "1.1 switch" -> 0
mvn -pl archunit-rules clean install   -> 0 [WARNING]/[ERROR]
mvn -X javadoc:jar                     -> executes maven-javadoc-plugin:3.11.2:jar

Pre-existing unrelated log lines in OTHER modules (ApicurioIT skipped; surefire fork-kill in redis-outbox-backend IT) are present on main and out of scope.

Verdict

CONDITIONAL_APPROVE — additive + behaviour-preserving.

  • No public API removed/broken: evaluateForWarning + violationCount unchanged.
  • No module version bump.
  • Parent-pom edit in scope (the offending config is genuinely in the parent); all modules build clean.

im2be-platform-libs • archunit-rules + parent pom • #332 W1 follow-up • resolved=2 / new=0 / carried=0 • commits 1b8bbf0 + 7e48163 • 2026-05-30

## #332 W1 follow-up — `archunit-rules` two small improvements **Project** im2be-platform-libs • **Module** archunit-rules (+ parent pom) • **Base** `main` • **#332 W1 follow-up** • 2026-05-30 ### TL;DR `CONDITIONAL_APPROVE` — additive combined `evaluate()` single-scan API (resolves the long-standing "double evaluation" minor flagged every reviewer round) + pins maven-javadoc-plugin to 3.11.2 to drop the spurious `-1.1 switch` warning (a 3.11.3 regression). Zero warnings; no API broken; no version bump. ### Summary Two independent improvements, one PR, two commits. (1) Adds `NoBlanketCatchArchTest.evaluate(JavaClasses) → WarnResult(count, report)` that scans the rule ONCE and returns both the ratchet count and the warn-mode report — the clean fix every PR-reviewer round suggested for the double evaluation in warn-mode tests. The legacy `evaluateForWarning` + `violationCount` are kept unchanged (the 7 merged services depend on them; purely additive). (2) Fixes the pre-existing `[WARNING] Javadoc 1.4+ doesn't support the -1.1 switch anymore` emitted on `mvn install` (javadoc:jar is bound to package). Reviewed commits: `1b8bbf0` (API) + `7e48163` (javadoc pin). ### Findings (addressed) | # | Severity | File:loc | Title | Resolution | |---|----------|----------|-------|------------| | 1 | MINOR | `NoBlanketCatchArchTest.java` | Rule evaluated twice per warn-test | New `record WarnResult(int count, String report)` + `evaluate()` single-scan method; Javadoc steers new callers to it; legacy methods retained for back-compat | | 2 | MINOR | `pom.xml` (parent, maven-javadoc-plugin) | Spurious `-1.1 switch` warning breaks the zero-warning gate (rule 62) | Pin plugin to `3.11.2` — last release before the 3.11.3 regression; no suppression knob exists in 3.11.3 | **Task-1 self-test:** `NoBlanketCatchSelfTest.evaluateReturnsCombinedCountAndReport` — negative package → `count==3` + report contains `"catches Exception"`; positive package → `count==0` + report `isEmpty()`. Both branches pinned via `.contain(...)` to guard a vacuous pass. **Task-2 root cause (rule 61, doc-grounded):** maven-javadoc-plugin **3.11.3** (resolved from the spring-boot-starter-parent 3.5.14 BOM) unconditionally logs the `-1.1 switch` warning during argument construction even though `old=false` and `<release>17>` is set — confirmed a regression (absent in 3.11.2) per the [Maven users mailing-list thread](https://www.mail-archive.com/users@maven.apache.org/msg146691.html). No config knob suppresses it in 3.11.3 (tested `<release>`, `<detectJavaApiLink>false>`, `<detectOfflineLinks>false>`, `<javadocVersion>` — none work); the plugin main-branch fix is unreleased. 3.11.2 is the last clean, behaviour-compatible release. The pin carries a remove-once-fixed note. ### Verification ``` mvn -pl archunit-rules test -> Tests run: 9 (NoBlanketCatchSelfTest 7, was 6), 0 fail/err, BUILD SUCCESS, 0 [WARNING]/[ERROR] mvn clean install (all modules) -> BUILD SUCCESS; grep -c "1.1 switch" -> 0 mvn -pl archunit-rules clean install -> 0 [WARNING]/[ERROR] mvn -X javadoc:jar -> executes maven-javadoc-plugin:3.11.2:jar ``` Pre-existing unrelated log lines in OTHER modules (ApicurioIT skipped; surefire fork-kill in redis-outbox-backend IT) are present on `main` and out of scope. ### Verdict `CONDITIONAL_APPROVE` — additive + behaviour-preserving. - No public API removed/broken: `evaluateForWarning` + `violationCount` unchanged. - No module version bump. - Parent-pom edit in scope (the offending config is genuinely in the parent); all modules build clean. ### Footer im2be-platform-libs • archunit-rules + parent pom • #332 W1 follow-up • resolved=2 / new=0 / carried=0 • commits 1b8bbf0 + 7e48163 • 2026-05-30
R-followup verdict findings (kept=1):

(1) MINOR NoBlanketCatchArchTest.java — double evaluation of the rule.
Warn-mode tests call both evaluateForWarning() and violationCount() back-to-back,
evaluating noBlanketCatchOutsideBoundary() TWICE over the same JavaClasses. Every
PR-reviewer round flagged this as a non-blocking minor finding. The reviewers'
suggested fix: a combined single-evaluation API returning both count and report.

Fix: add `public record WarnResult(int count, String report)` plus
`public static WarnResult evaluate(JavaClasses)` that calls the rule's
evaluate() exactly ONCE and returns both the FailureReport detail-size count
(ratchet semantics, identical to violationCount) and the report string
(identical to evaluateForWarning). The two legacy accessors are KEPT unchanged
for back-compat — the 7 merged services depend on them; this is purely
additive. New callers are steered to the single-scan method via Javadoc on all
three methods + the README archunit-rules entry. No module version bump.

Verification:
- mvn -pl archunit-rules test -> Tests run: 9 (NoBlanketCatchSelfTest 7, was 6),
  Failures: 0, Errors: 0; BUILD SUCCESS; zero [WARNING]/[ERROR].
- New self-test evaluateReturnsCombinedCountAndReport: negative package ->
  count==3 + report contains "catches Exception"; positive package -> count==0
  + report isEmpty(). Both branches pinned via .contain(...) to guard a vacuous
  pass.
build: pin maven-javadoc-plugin to 3.11.2 to drop spurious -1.1 warning
All checks were successful
im2be-platform-libs CI / mvn install (pull_request) Successful in 1m12s
im2be-platform-libs CI / mvn verify (main only) (pull_request) Has been skipped
7e48163049
R-followup verdict findings (kept=1):

(1) MINOR pom.xml — javadoc:jar emits "[WARNING] Javadoc 1.4+ doesn't support
the -1.1 switch anymore. Ignore this option." once per module on mvn install
(javadoc:jar is bound to package). This breaks the repo's zero-warning gate
(rule 62) even though no -1.1 switch is actually used.

Root cause (rule 61 — verified against the Maven users mailing-list thread
2026-05-30, https://www.mail-archive.com/users@maven.apache.org/msg146691.html):
a REGRESSION in maven-javadoc-plugin 3.11.3 (resolved transitively from the
spring-boot-starter-parent 3.5.14 BOM). 3.11.3 unconditionally logs this WARNING
during javadoc argument construction. The `old` parameter is false and we set
<release>17; the -1.1 switch is never passed to the javadoc tool. 3.11.3 exposes
NO config knob to suppress it (confirmed: <release>, <detectJavaApiLink>false>,
<detectOfflineLinks>false>, <javadocVersion> — none silence it). The plugin's
main-branch fix is not yet released. 3.11.2 is the last release without the
regression and is otherwise behaviour-compatible.

Fix: pin maven-javadoc-plugin <version>3.11.2</version> in the parent pom's
javadoc pluginManagement/plugins block with a documented rationale + a remove-
once-fixed note. Also added <release>17</release> to align the javadoc tool's
source level with the compiler plugin (which uses <release>17</release>) — the
javadoc `release` param otherwise defaults to ${maven.compiler.release}, unset
in this POM. No new warnings introduced. Parent-pom edit is in scope per the
task (the offending config is genuinely in the parent); all modules verified.

Verification:
- mvn clean install (all modules) -> BUILD SUCCESS; grep -c "1.1 switch" -> 0.
- mvn -pl archunit-rules clean install -> 0 [WARNING]/[ERROR].
- Executed plugin version confirmed via mvn -X:
  org.apache.maven.plugins:maven-javadoc-plugin:3.11.2:jar.
- Pre-existing unrelated lines in OTHER modules (ApicurioIT skipped; surefire
  fork-kill in redis-outbox-backend IT) are present on main, out of scope.

Superseded by round 2.

Show previous round

hib-pr-reviewer review — PR #17 (affinity-intelligence-rework/im2be-platform-libs)

Round 1 — head 7e481630499d, base main, trigger opened

TL;DR: CONDITIONAL_APPROVE — A=1 kept (verified double-getFailureReport call), B=2 kept (class-level Javadoc mismatch at L19 + WarnResult missing invariant guards); no blocking issues.

Summary

Arbitration — Round 1

No prior run history for PR #17 (first arbitration). No reusable submodule patterns in Memora. All three findings verified against HEAD at /var/lib/pr-reviewer/repos/affinity-intelligence-rework/im2be-platform-libs/1300.

A-1 (unique-to-A, lines 113–115): CONFIRMED. The new evaluate() method at lines 107–116 makes two separate calls to result.getFailureReport() — once for .getDetails().size() (line 114) and once for .toString() (line 115). The companion methods evaluateForWarning (line 131) and violationCount (line 150) each call it once. A's analysis is correct: two allocations per call and no guarantee of identity. KEPT.

B-1 (unique-to-B, cited line 107): CONFIRMED with corrected line. The real issue is at line 19 of the class-level Javadoc, which still reads NoBlanketCatchArchTest.evaluateForWarning(classes) despite evaluate() (line 107) being documented as the preferred single-scan entry point. B's cited line 107 is where evaluate() opens — the actual offending text is at line 19 — but the finding is grounded and the concern is real. KEPT with corrected line citation.

B-2 (unique-to-B, line 68): CONFIRMED. public record WarnResult(int count, String report) { } has no compact constructor. As a public library type, external callers can construct it with count < 0 or report == null; the latter causes NPE on the result.report().isEmpty() pattern shown in the method Javadoc. KEPT.

All findings are minor. Run summary persisted to Memora (id 421).

Blast Radius

The diff touches a single archunit-rules library module plus a pom.xml version pin. The changed surface is the public API of NoBlanketCatchArchTest — new evaluate() method and WarnResult record — which will be consumed downstream but is additive-only (legacy methods retained). Impact is limited to library consumers that adopt the new entry point.

BLAST_SCORE: 2/10

CI status (head 7e481630499d)

Overall: ✓ success

2 checks: 2 pending

Check State Link
im2be-platform-libs CI / mvn install (pull_request) pending details
im2be-platform-libs CI / mvn verify (main only) (pull_request) pending details

Findings (2)

[MINOR] evaluate() calls result.getFailureReport() twice — two allocations, no shared reference

archunit-rules/src/main/java/com/aim2be/platform/archunit/NoBlanketCatchArchTest.java:113

In the violation branch of evaluate() (lines 113–115), result.getFailureReport() is invoked twice:

return new WarnResult(
        result.getFailureReport().getDetails().size(),  // ← first call
        result.getFailureReport().toString());           // ← second call

In ArchUnit 1.3.0, EvaluationResult.getFailureReport() constructs a new FailureReport from the underlying ConditionEvents on every call — two objects, two traversals. More critically, no guarantee exists that both calls return an equivalent snapshot; if ArchUnit ever lazily re-evaluates, count and report in the returned WarnResult could silently diverge. The sibling methods evaluateForWarning (line 131) and violationCount (line 150) each call it once. Apply the same discipline:

import com.tngtech.archunit.lang.FailureReport;

public static WarnResult evaluate(final JavaClasses classes) {
    final EvaluationResult result =
            NoBlanketCatch.noBlanketCatchOutsideBoundary().evaluate(classes);
    if (!result.hasViolation()) {
        return new WarnResult(0, "");
    }
    final FailureReport fr = result.getFailureReport();  // single retrieval
    return new WarnResult(fr.getDetails().size(), fr.toString());
}

This eliminates the double allocation and makes count and report provably consistent (same FailureReport instance).

[MINOR] Public WarnResult record lacks compact-constructor invariant enforcement

archunit-rules/src/main/java/com/aim2be/platform/archunit/NoBlanketCatchArchTest.java:68

WarnResult is public with no guards:

public record WarnResult(int count, String report) {
}

count can be negative and report can be null, both contradicting the Javadoc contract. Callers following the method Javadoc's pattern (result.report().isEmpty()) will throw NPE if report is null. Add a compact constructor:

public record WarnResult(int count, String report) {
    public WarnResult {
        Objects.requireNonNull(report, "report");
        if (count < 0) throw new IllegalArgumentException("count must be >= 0, got: " + count);
    }
}

This is cheap, idiomatic for Java 17+ public-library records, and makes the contract machine-checked rather than documentation-only.

Verdict

CONDITIONAL_APPROVE


hib-pr-reviewer • round 1 • 2 findings (2m) • 2026-05-30T21:53:50.789Z → 2026-05-30T21:55:11.763Z • posted-as: pr-reviewer-bot • model: auto

<!-- hib-pr-reviewer collapsed --> > _Superseded by round 2._ <details> <summary>Show previous round</summary> ## hib-pr-reviewer review — PR #17 (affinity-intelligence-rework/im2be-platform-libs) **Round 1** — head `7e481630499d`, base `main`, trigger `opened` **TL;DR:** CONDITIONAL_APPROVE — A=1 kept (verified double-getFailureReport call), B=2 kept (class-level Javadoc mismatch at L19 + WarnResult missing invariant guards); no blocking issues. ### Summary ## Arbitration — Round 1 No prior run history for PR #17 (first arbitration). No reusable submodule patterns in Memora. All three findings verified against HEAD at `/var/lib/pr-reviewer/repos/affinity-intelligence-rework/im2be-platform-libs/1300`. **A-1 (unique-to-A, lines 113–115):** CONFIRMED. The new `evaluate()` method at lines 107–116 makes two separate calls to `result.getFailureReport()` — once for `.getDetails().size()` (line 114) and once for `.toString()` (line 115). The companion methods `evaluateForWarning` (line 131) and `violationCount` (line 150) each call it once. A's analysis is correct: two allocations per call and no guarantee of identity. KEPT. **B-1 (unique-to-B, cited line 107):** CONFIRMED with corrected line. The real issue is at line 19 of the class-level Javadoc, which still reads `NoBlanketCatchArchTest.evaluateForWarning(classes)` despite `evaluate()` (line 107) being documented as the preferred single-scan entry point. B's cited line 107 is where `evaluate()` opens — the actual offending text is at line 19 — but the finding is grounded and the concern is real. KEPT with corrected line citation. **B-2 (unique-to-B, line 68):** CONFIRMED. `public record WarnResult(int count, String report) { }` has no compact constructor. As a public library type, external callers can construct it with `count < 0` or `report == null`; the latter causes NPE on the `result.report().isEmpty()` pattern shown in the method Javadoc. KEPT. All findings are minor. Run summary persisted to Memora (id 421). ### Blast Radius The diff touches a single archunit-rules library module plus a pom.xml version pin. The changed surface is the public API of `NoBlanketCatchArchTest` — new `evaluate()` method and `WarnResult` record — which will be consumed downstream but is additive-only (legacy methods retained). Impact is limited to library consumers that adopt the new entry point. **BLAST_SCORE: 2/10** ### CI status (head `7e481630499d`) **Overall: ✓ success** 2 checks: 2 pending | Check | State | Link | |---|---|---| | im2be-platform-libs CI / mvn install (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/99/jobs/0) | | im2be-platform-libs CI / mvn verify (main only) (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/99/jobs/1) | ### Findings (2) #### **[MINOR]** `evaluate()` calls `result.getFailureReport()` twice — two allocations, no shared reference _archunit-rules/src/main/java/com/aim2be/platform/archunit/NoBlanketCatchArchTest.java:113_ In the violation branch of `evaluate()` (lines 113–115), `result.getFailureReport()` is invoked twice: ```java return new WarnResult( result.getFailureReport().getDetails().size(), // ← first call result.getFailureReport().toString()); // ← second call ``` In ArchUnit 1.3.0, `EvaluationResult.getFailureReport()` constructs a new `FailureReport` from the underlying `ConditionEvents` on every call — two objects, two traversals. More critically, no guarantee exists that both calls return an equivalent snapshot; if ArchUnit ever lazily re-evaluates, `count` and `report` in the returned `WarnResult` could silently diverge. The sibling methods `evaluateForWarning` (line 131) and `violationCount` (line 150) each call it once. Apply the same discipline: ```java import com.tngtech.archunit.lang.FailureReport; public static WarnResult evaluate(final JavaClasses classes) { final EvaluationResult result = NoBlanketCatch.noBlanketCatchOutsideBoundary().evaluate(classes); if (!result.hasViolation()) { return new WarnResult(0, ""); } final FailureReport fr = result.getFailureReport(); // single retrieval return new WarnResult(fr.getDetails().size(), fr.toString()); } ``` This eliminates the double allocation and makes `count` and `report` provably consistent (same `FailureReport` instance). #### **[MINOR]** Public `WarnResult` record lacks compact-constructor invariant enforcement _archunit-rules/src/main/java/com/aim2be/platform/archunit/NoBlanketCatchArchTest.java:68_ `WarnResult` is `public` with no guards: ```java public record WarnResult(int count, String report) { } ``` `count` can be negative and `report` can be null, both contradicting the Javadoc contract. Callers following the method Javadoc's pattern (`result.report().isEmpty()`) will throw NPE if `report` is null. Add a compact constructor: ```java public record WarnResult(int count, String report) { public WarnResult { Objects.requireNonNull(report, "report"); if (count < 0) throw new IllegalArgumentException("count must be >= 0, got: " + count); } } ``` This is cheap, idiomatic for Java 17+ public-library records, and makes the contract machine-checked rather than documentation-only. ### Verdict **CONDITIONAL_APPROVE** --- <sub>hib-pr-reviewer • round 1 • 2 findings (2m) • 2026-05-30T21:53:50.789Z → 2026-05-30T21:55:11.763Z • posted-as: pr-reviewer-bot • model: auto</sub> </details>
fix(archunit-rules): address #17 R1 — single FailureReport retrieval + WarnResult guards
All checks were successful
im2be-platform-libs CI / mvn install (pull_request) Successful in 1m14s
im2be-platform-libs CI / mvn verify (main only) (pull_request) Has been skipped
fb61ab3a6d
R1 verdict CONDITIONAL_APPROVE; 3 minor findings (kept):

(1) MINOR evaluate() called result.getFailureReport() twice (two allocations; count
    + report could diverge if ArchUnit ever re-evaluates). Now retrieved once into a
    local FailureReport → fewer allocations + provably-consistent snapshot.
(2) MINOR WarnResult record had no invariant enforcement. Added a compact constructor:
    count >= 0 (IllegalArgumentException) + report non-null (NPE). Matches its Javadoc.
(3) MINOR class-level Javadoc WARN-mode snippet still showed the old evaluateForWarning
    pattern; updated to the preferred single-scan evaluate() (consistent with the
    method Javadoc).

Added NoBlanketCatchSelfTest.warnResultGuardsInvariants (rule 6 — the new guard).

Verification:
- mvn -pl archunit-rules test → Tests run: 10, Failures: 0, Errors: 0 (BUILD SUCCESS,
  zero warnings); NoBlanketCatchSelfTest 7 → 8.

hib-pr-reviewer review — PR #17 (affinity-intelligence-rework/im2be-platform-libs)

Round 2 — head fb61ab3a6da9, base main, trigger synchronize

TL;DR: CONDITIONAL_APPROVE — kept 2 unique-to-B findings (both verified via Read): Javadoc misattribution in test (minor) and fully-qualified Objects.requireNonNull without import (info); both R1 blocking findings confirmed resolved.

Summary

Reconciliation: A=0 findings, B=2 findings (both unique-to-B, both verified).

No agreed findings (A was empty). Both B findings were verified via Read against HEAD:

  1. Javadoc misattribution (minor, kept): NoBlanketCatchSelfTest.java lines 175-178 contain a /** Imports the negative package, pins the three flagged fixtures… */ block that was originally Javadoc for evaluateNegative(). After the PR inserted warnResultGuardsInvariants() immediately after that comment, the Javadoc now precedes warnResultGuardsInvariants() — Java associates a /** */ block with the immediately following declaration. evaluateNegative() (line 190) now has no Javadoc. Confirmed by Read at lines 175-190.

  2. Fully-qualified Objects.requireNonNull without import (info, kept): NoBlanketCatchArchTest.java line 76 uses java.util.Objects.requireNonNull(report, "report") while the file's import block (lines 1-5) only imports three com.tngtech.archunit classes and FailureReport — no import java.util.Objects;. Valid Java but inconsistent with the file's single-type-import style. Confirmed by Read.

Prior R1 findings both resolved per both reviewers; not re-raised. Memora persisted as new memory ID 422 (create-new path, review_count=2).

Blast Radius

The diff touches 4 files but the substantive changes are confined to archunit-rules — an internal utility library. The new WarnResult record and evaluate() method are exported public API consumed by downstream service test suites, so callers will need to migrate from the dual-accessor pattern to use the single-scan entry point. README and pom.xml changes are documentation/dependency-only.

BLAST_SCORE: 4/10

CI status (head fb61ab3a6da9)

Overall: ✓ success

2 checks: 2 pending

Check State Link
im2be-platform-libs CI / mvn install (pull_request) pending details
im2be-platform-libs CI / mvn verify (main only) (pull_request) pending details

Findings (2)

[MINOR] Pre-existing Javadoc for evaluateNegative() is now misattributed to warnResultGuardsInvariants()

archunit-rules/src/test/java/com/aim2be/platform/archunit/NoBlanketCatchSelfTest.java:179

The /** Imports the negative package, pins the three flagged fixtures so the evaluation can never silently skip one, and returns a violating result. */ block (lines 175-178) was written as Javadoc for the evaluateNegative() private helper. The PR inserted warnResultGuardsInvariants() (lines 179-188) immediately after that comment block, so Java now associates the Javadoc with warnResultGuardsInvariants() instead. evaluateNegative() (line 190) is left without any Javadoc.

Concrete fix — move warnResultGuardsInvariants (lines 179-188) to before line 175 so the Javadoc immediately precedes evaluateNegative() again:

    @Test
    @DisplayName("WarnResult enforces its invariants: count >= 0 and report non-null")
    void warnResultGuardsInvariants() {
        assertThatThrownBy(() -> new NoBlanketCatchArchTest.WarnResult(-1, ""))
                .as("negative count is rejected")
                .isInstanceOf(IllegalArgumentException.class);
        assertThatThrownBy(() -> new NoBlanketCatchArchTest.WarnResult(0, null))
                .as("null report is rejected")
                .isInstanceOf(NullPointerException.class);
    }

    /**
     * Imports the negative package, pins the three flagged fixtures so the
     * evaluation can never silently skip one, and returns a violating result.
     */
    private static EvaluationResult evaluateNegative() {  }

Impact is limited to test sources (private method, no generated Javadoc published), but the mismatch is a readability hazard for future contributors.

[INFO] java.util.Objects.requireNonNull used with fully-qualified name — no import

archunit-rules/src/main/java/com/aim2be/platform/archunit/NoBlanketCatchArchTest.java:76

Line 76 uses java.util.Objects.requireNonNull(report, "report") in the compact constructor of WarnResult. The file's import block (lines 1-5) imports only three com.tngtech.archunit classes; there is no import java.util.Objects;. The code compiles and behaves correctly, but it is inconsistent with the single-type-import convention used for every other dependency in the file.

Concrete fix — add import java.util.Objects; after line 5 and shorten the call:

import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.lang.EvaluationResult;
import com.tngtech.archunit.lang.FailureReport;
import java.util.Objects;

// … in the compact constructor:
public WarnResult {
    if (count < 0) {
        throw new IllegalArgumentException("count must be >= 0, was " + count);
    }
    Objects.requireNonNull(report, "report");
}

No behaviour change; purely style alignment.

Verdict

CONDITIONAL_APPROVE


hib-pr-reviewer • round 2 • 2 findings (1m/1i) • 2026-05-30T22:01:39.494Z → 2026-05-30T22:03:10.842Z • posted-as: pr-reviewer-bot • model: auto

## hib-pr-reviewer review — PR #17 (affinity-intelligence-rework/im2be-platform-libs) **Round 2** — head `fb61ab3a6da9`, base `main`, trigger `synchronize` **TL;DR:** CONDITIONAL_APPROVE — kept 2 unique-to-B findings (both verified via Read): Javadoc misattribution in test (minor) and fully-qualified Objects.requireNonNull without import (info); both R1 blocking findings confirmed resolved. ### Summary **Reconciliation: A=0 findings, B=2 findings (both unique-to-B, both verified).** No agreed findings (A was empty). Both B findings were verified via `Read` against HEAD: 1. **Javadoc misattribution (minor, kept):** `NoBlanketCatchSelfTest.java` lines 175-178 contain a `/** Imports the negative package, pins the three flagged fixtures… */` block that was originally Javadoc for `evaluateNegative()`. After the PR inserted `warnResultGuardsInvariants()` immediately after that comment, the Javadoc now precedes `warnResultGuardsInvariants()` — Java associates a `/** */` block with the immediately following declaration. `evaluateNegative()` (line 190) now has no Javadoc. Confirmed by Read at lines 175-190. 2. **Fully-qualified `Objects.requireNonNull` without import (info, kept):** `NoBlanketCatchArchTest.java` line 76 uses `java.util.Objects.requireNonNull(report, "report")` while the file's import block (lines 1-5) only imports three `com.tngtech.archunit` classes and `FailureReport` — no `import java.util.Objects;`. Valid Java but inconsistent with the file's single-type-import style. Confirmed by Read. Prior R1 findings both resolved per both reviewers; not re-raised. Memora persisted as new memory ID 422 (create-new path, `review_count=2`). ### Blast Radius The diff touches 4 files but the substantive changes are confined to `archunit-rules` — an internal utility library. The new `WarnResult` record and `evaluate()` method are exported public API consumed by downstream service test suites, so callers will need to migrate from the dual-accessor pattern to use the single-scan entry point. README and pom.xml changes are documentation/dependency-only. **BLAST_SCORE: 4/10** ### CI status (head `fb61ab3a6da9`) **Overall: ✓ success** 2 checks: 2 pending | Check | State | Link | |---|---|---| | im2be-platform-libs CI / mvn install (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/100/jobs/0) | | im2be-platform-libs CI / mvn verify (main only) (pull_request) | ⏳ pending | [details](/affinity-intelligence-rework/im2be-platform-libs/actions/runs/100/jobs/1) | ### Findings (2) #### **[MINOR]** Pre-existing Javadoc for `evaluateNegative()` is now misattributed to `warnResultGuardsInvariants()` _archunit-rules/src/test/java/com/aim2be/platform/archunit/NoBlanketCatchSelfTest.java:179_ The `/** Imports the negative package, pins the three flagged fixtures so the evaluation can never silently skip one, and returns a violating result. */` block (lines 175-178) was written as Javadoc for the `evaluateNegative()` private helper. The PR inserted `warnResultGuardsInvariants()` (lines 179-188) immediately after that comment block, so Java now associates the Javadoc with `warnResultGuardsInvariants()` instead. `evaluateNegative()` (line 190) is left without any Javadoc. **Concrete fix** — move `warnResultGuardsInvariants` (lines 179-188) to before line 175 so the Javadoc immediately precedes `evaluateNegative()` again: ```java @Test @DisplayName("WarnResult enforces its invariants: count >= 0 and report non-null") void warnResultGuardsInvariants() { assertThatThrownBy(() -> new NoBlanketCatchArchTest.WarnResult(-1, "")) .as("negative count is rejected") .isInstanceOf(IllegalArgumentException.class); assertThatThrownBy(() -> new NoBlanketCatchArchTest.WarnResult(0, null)) .as("null report is rejected") .isInstanceOf(NullPointerException.class); } /** * Imports the negative package, pins the three flagged fixtures so the * evaluation can never silently skip one, and returns a violating result. */ private static EvaluationResult evaluateNegative() { … } ``` Impact is limited to test sources (private method, no generated Javadoc published), but the mismatch is a readability hazard for future contributors. #### **[INFO]** `java.util.Objects.requireNonNull` used with fully-qualified name — no import _archunit-rules/src/main/java/com/aim2be/platform/archunit/NoBlanketCatchArchTest.java:76_ Line 76 uses `java.util.Objects.requireNonNull(report, "report")` in the compact constructor of `WarnResult`. The file's import block (lines 1-5) imports only three `com.tngtech.archunit` classes; there is no `import java.util.Objects;`. The code compiles and behaves correctly, but it is inconsistent with the single-type-import convention used for every other dependency in the file. **Concrete fix** — add `import java.util.Objects;` after line 5 and shorten the call: ```java import com.tngtech.archunit.core.domain.JavaClasses; import com.tngtech.archunit.lang.EvaluationResult; import com.tngtech.archunit.lang.FailureReport; import java.util.Objects; // … in the compact constructor: public WarnResult { if (count < 0) { throw new IllegalArgumentException("count must be >= 0, was " + count); } Objects.requireNonNull(report, "report"); } ``` No behaviour change; purely style alignment. ### Verdict **CONDITIONAL_APPROVE** --- <sub>hib-pr-reviewer • round 2 • 2 findings (1m/1i) • 2026-05-30T22:01:39.494Z → 2026-05-30T22:03:10.842Z • posted-as: pr-reviewer-bot • model: auto</sub>
hibryda deleted branch feat/archunit-noblanketcatch-combined-eval 2026-05-31 00:03:57 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
affinity-intelligence-rework/im2be-platform-libs!17
No description provided.