Skip to content

Commit ee18824

Browse files
committed
Fixing exclusion logic
1 parent 430d720 commit ee18824

File tree

1 file changed

+10
-78
lines changed

1 file changed

+10
-78
lines changed

maven/core-unittests/spotbugs-exclude.xml

Lines changed: 10 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,4 @@
11
<FindBugsFilter>
2-
<!-- Match>
3-
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
4-
</Match>
5-
<Match>
6-
<Bug pattern="DM_GC"/>
7-
</Match>
8-
<Match>
9-
<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
10-
</Match>
11-
<Match>
12-
<Bug pattern="BC_UNCONFIRMED_CAST"/>
13-
</Match>
14-
<Match>
15-
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
16-
</Match>
17-
<Match>
18-
<Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
19-
</Match>
20-
<Match>
21-
<Bug pattern="DM_BOOLEAN_CTOR"/>
22-
</Match>
23-
<Match>
24-
<Bug pattern="DM_CONVERT_CASE"/>
25-
</Match>
26-
<Match>
27-
<Bug pattern="DM_EXIT"/>
28-
</Match>
29-
<Match>
30-
<Bug pattern="EI_EXPOSE_REP"/>
31-
</Match>
32-
<Match>
33-
<Bug pattern="EI_EXPOSE_REP2"/>
34-
</Match>
35-
<Match>
36-
<Bug pattern="EI_EXPOSE_STATIC_REP2"/>
37-
</Match>
38-
<Match>
39-
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>
40-
</Match>
41-
<Match>
42-
<Bug pattern="MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR"/>
43-
</Match>
44-
<Match>
45-
<Bug pattern="MS_EXPOSE_REP"/>
46-
</Match>
47-
<Match>
48-
<Bug pattern="NM_CONFUSING"/>
49-
</Match>
50-
<Match>
51-
<Bug pattern="NO_NOTIFY_NOT_NOTIFYALL"/>
52-
</Match>
53-
<Match>
54-
<Bug pattern="NP_BOOLEAN_RETURN_NULL"/>
55-
</Match>
56-
<Match>
57-
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
58-
</Match>
59-
<Match>
60-
<Bug pattern="REFLC_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_CLASS"/>
61-
</Match !-->
62-
632
<!-- We don't support serialization -->
643
<Match>
654
<Bug pattern="SE_NO_SERIALVERSIONID"/>
@@ -69,8 +8,6 @@
698
<Match>
709
<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
7110
</Match>
72-
73-
<!-- We don't support clone() -->
7411
<Match>
7512
<Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
7613
</Match>
@@ -103,7 +40,6 @@
10340
<Bug pattern="EI_EXPOSE_STATIC_REP2"/>
10441
</Match>
10542

106-
10743
<!--
10844
This rule prevents Class.newInstance() which we generally avoid anyway.
10945
However, the solution is to use java.beans or reflection to create a class
@@ -114,23 +50,13 @@
11450
<Bug pattern="REFLC_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_CLASS"/>
11551
</Match>
11652

117-
<!-- Match>
118-
<Bug pattern="UI_INHERITANCE_UNSAFE_GETRESOURCE"/>
119-
</Match>
120-
<Match>
121-
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"/>
122-
</Match>
123-
<Match>
124-
<Bug pattern="UW_UNCOND_WAIT"/>
125-
</Match>
126-
<Match>
127-
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
128-
</Match -->
129-
53+
<!-- This seems to be a problem with the check -->
13054
<Match>
13155
<Class name="~com\.codename1\.io\.Socket.*" />
13256
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
13357
</Match>
58+
59+
<!-- This is a 3rd party file that's really hard to fix properly -->
13460
<Match>
13561
<Class name="~com\.codename1\.io\.gzip\.InfBlocks.*" />
13662
<Bug pattern="SA_FIELD_SELF_ASSIGNMENT" />
@@ -150,7 +76,13 @@
15076

15177
<!-- The API isThemeConstant should return null when the value isn't found -->
15278
<Match>
153-
<Class name="~com\.codename1\.plaf\.UIManager.*" />
79+
<Class name="com.codename1.plaf.UIManager" />
80+
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
81+
</Match>
82+
83+
<!-- The API canExecute should return null when we don't know the answer -->
84+
<Match>
85+
<Class name="com.codename1.impl.CodenameOneImplementation" />
15486
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
15587
</Match>
15688

0 commit comments

Comments
 (0)