blob: 094bd2fa6383e9e9f9fea32111f842acd31efc46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
<FindBugsFilter>
<Match>
<!-- Reason: Null has a different meaning than a zero-length array in this case. -->
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
<Class name="io.opencensus.stats.MutableDistribution" />
<Method name="getInternalBucketCountsArray" />
</Match>
<Match>
<!-- Reason: Equal is implemented in the AutoValue generated class. -->
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>
<Class name="io.opencensus.common.Timestamp" />
<Method name="compareTo" />
</Match>
<Match>
<!-- Reason: Equal is implemented in the AutoValue generated class. -->
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>
<Class name="io.opencensus.common.Duration" />
<Method name="compareTo" />
</Match>
<Match>
<!-- Reason: BaseMessageEvent only has two visible subclasses. -->
<Bug pattern="BC_UNCONFIRMED_CAST"/>
<Class name="io.opencensus.trace.internal.BaseMessageEventUtils" />
</Match>
<Match>
<!-- Reason: This test is testing for a NPE. -->
<Bug pattern="NP_NONNULL_PARAM_VIOLATION"/>
<Class name="io.opencensus.internal.UtilsTest" />
<Method name="checkNotNull" />
</Match>
<!-- Suppress some FindBugs warnings related to performance or robustness -->
<!-- in test classes, where those issues are less important. -->
<Match>
<!-- Reason: Only needed for performance. -->
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
<Source name="~.*Test\.java" />
</Match>
<Match>
<!-- Reason: Only needed for performance. -->
<Bug pattern="WMI_WRONG_MAP_ITERATOR"/>
<Source name="~.*Test\.java" />
</Match>
<Match>
<!-- Reason: Only needed for performance. -->
<Bug pattern="UM_UNNECESSARY_MATH"/>
<Source name="~.*Test\.java" />
</Match>
<Match>
<!-- Reason: This is less important in a test environment. -->
<Bug pattern="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"/>
<Source name="~.*Test\.java" />
</Match>
<Match>
<!-- Reason: Many classes initialize fields in @Before methods. -->
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
<Source name="~.*Test\.java" />
</Match>
<!-- Suppress all FindBugs warnings about NullPointerExceptions in -->
<!-- non-test code. They are redundant with the Checker Framework's -->
<!-- warnings, and they sometimes conflict. These warnings are still -->
<!-- useful in test code, where we don't use the Checker Framework. -->
<Match>
<Bug code="NP"/>
<Not>
<Source name="~.*Test\.java" />
</Not>
</Match>
<Match>
<Bug pattern="UR_UNINIT_READ"/>
<Not>
<Source name="~.*Test\.java" />
</Not>
</Match>
<Match>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
<Not>
<Source name="~.*Test\.java" />
</Not>
</Match>
</FindBugsFilter>
|