build: exclude the deliberate System.gc in the notification gauge test

`spotbugsTest` and `spotbugsSampleOffTest` on :app-bootstrap fail on DM_GC in
NotificationObservationTest, which predates this branch — the file arrives from
701ba67 and this branch never touched it. The merge only surfaces it.

The call is intentional and cannot be removed without removing the assertion:
Micrometer holds gauge referents weakly, so a gauge whose source object is
collected reports NaN from then on, and provoking a collection is the only way
to show the notification metrics do not have that defect.

Scoped to the one method by class and method name, per the filter's own rule
that entries be narrow — a System.gc() anywhere else stays reportable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-08-14 14:23:14 +09:00
co-authored by Claude Opus 5
parent ae85f23dd3
commit 59a392ee96
+10
View File
@@ -43,4 +43,14 @@
<Source name="DefaultTypingFixture.java"/> <Source name="DefaultTypingFixture.java"/>
</Match> </Match>
<!-- Micrometer holds gauge referents weakly, so a gauge whose source object is collected
reports NaN forever afterwards. The only way to assert that the notification metrics do
NOT have that defect is to provoke a collection, which is what DM_GC flags. Scoped to the
single test method that does it; a System.gc() anywhere else remains reportable. -->
<Match>
<Bug pattern="DM_GC"/>
<Class name="dev.caskeleton.bootstrap.notification.observation.NotificationObservationTest"/>
<Method name="aGaugeKeepsReportingAfterGarbageCollectionInsteadOfDecayingToNaN"/>
</Match>
</FindBugsFilter> </FindBugsFilter>