Skip to content

Commit da1af60

Browse files
committed
Suppress false-positive NN_NAKED_NOTIFY on H2StreamBody.signal()
1 parent bcfcaf2 commit da1af60

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

config/spotbugs/filter.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@
8686
<Bug pattern="DCN_NULLPOINTER_EXCEPTION" />
8787
</Match>
8888

89+
<!--
90+
~ signal() intentionally calls notifyAll() with no state change of its own: the queue state was
91+
~ already mutated under the same monitor by a preceding burst of offer(..., signal=false) calls,
92+
~ and signal() just flushes the deferred consumer wake. The naked-notify heuristic can't see the
93+
~ prior offers, so this is a false positive.
94+
-->
95+
<Match>
96+
<Class name="software.amazon.smithy.java.http.client.h2.H2StreamBody"/>
97+
<Method name="signal"/>
98+
<Bug pattern="NN_NAKED_NOTIFY"/>
99+
</Match>
100+
89101
<!-- JMH benchmark files - not production code -->
90102
<Match>
91103
<Class name="~.*\.http\.client\.VirtualThreadScalingBenchmark.*"/>

0 commit comments

Comments
 (0)