-
Notifications
You must be signed in to change notification settings - Fork 796
/
spotbugs-suppressions.xml
136 lines (120 loc) · 5.69 KB
/
spotbugs-suppressions.xml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License").
~ You may not use this file except in compliance with the License.
~ A copy of the License is located at
~
~ http://aws.amazon.com/apache2.0
~
~ or in the "license" file accompanying this file. This file is distributed
~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
~ express or implied. See the License for the specific language governing
~ permissions and limitations under the License.
-->
<FindBugsFilter>
<Match>
<!-- PZLA_PREFER_ZERO_LENGTH_ARRAYS: This rule causes many false positives, because sometimes we want to return
null for arrays. -->
<!-- UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR: This rule causes many false positives, because we may be null
checking using a library function, like Validate.notNull. -->
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS,UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<Match>
<Or>
<!-- Container classes do not copy arrays for performance reasons at this time. -->
<Class name="software.amazon.awssdk.protocols.json.JsonContent" />
</Or>
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" />
</Match>
<!-- Delegate closes input stream. -->
<Match>
<Class name="software.amazon.awssdk.protocols.ion.internal.IonFactory" />
<Method name="createParser" />
<Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
</Match>
<!-- We do not have control over these objects being serializable, but we do not intend for them to fully function
after serialization. -->
<Match>
<Or>
<Class name="software.amazon.awssdk.services.dynamodb.datamodeling.DynamoDBMapper$BatchGetItemException"/>
<Class name="software.amazon.awssdk.protocols.ion.internal.IonFactory"/>
</Or>
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
</Match>
<!-- Protocol test client suppressions. -->
<Match>
<Or>
<Package name="~software\.amazon\.awssdk\.services\.protocol.*"/>
</Or>
<!-- URF_UNREAD_FIELD, DLS_DEAD_LOCAL_STORE: Sometimes we have unread variables and fields because they're only
conditionally used. It's cleaner to just always generate them, even if we may not actually be using them. -->
<!-- REC_CATCH_EXCEPTION: Sometimes we want to convert runtime exceptions into sdk exceptions, so we catch it and
wrap it in an sdk-specific exception. -->
<Bug pattern="URF_UNREAD_FIELD,DLS_DEAD_LOCAL_STORE,REC_CATCH_EXCEPTION" />
</Match>
<!-- False positive -->
<Match>
<Class name="software.amazon.awssdk.core.ResponseBytes" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<!-- False positive Unconfirmed cast-->
<Match>
<Or>
<Class name="software.amazon.awssdk.core.client.handler.BaseAsyncClientHandler$InterceptorCallingHttpResponseHandler" />
<Class name="software.amazon.awssdk.core.client.handler.BaseAsyncClientHandler$UnmarshallingSdkHttpResponseHandler" />
<Class name="software.amazon.awssdk.core.internal.http.async.SyncResponseHandlerAdapter" />
</Or>
<Bug pattern="BC_UNCONFIRMED_CAST" />
</Match>
<!-- Currently they look the same and we will revisit this when we add APIG -->
<Match>
<Or>
<Class name="software.amazon.awssdk.core.client.handler.SdkAsyncClientHandler" />
<Class name="software.amazon.awssdk.core.client.handler.SdkSyncClientHandler" />
<Class name="software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler" />
<Class name="software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler" />
</Or>
<Bug pattern="RI_REDUNDANT_INTERFACES" />
</Match>
<Match>
<Or>
<Package name="io.netty.handler.codec.http2"/>
<Class name="software.amazon.awssdk.http.nio.netty.internal.utils.BetterFixedChannelPool" />
</Or>
<Bug pattern="BC_UNCONFIRMED_CAST,SIC_INNER_SHOULD_BE_STATIC_ANON,DLS_DEAD_LOCAL_STORE,DM_CONVERT_CASE,NM_CLASS_NOT_EXCEPTION,NP_NULL_ON_SOME_PATH"/>
</Match>
<Match>
<Class name="software.amazon.awssdk.benchmark.dynamodb.V1DynamoDbAttributeValue$TestItemUnmarshalling" />
<Method name="utf8" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="software.amazon.awssdk.benchmark.dynamodb.V2DynamoDbAttributeValue$TestItemUnmarshalling" />
<Method name="utf8" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="software.amazon.awssdk.protocols.json.internal.unmarshall.JsonProtocolUnmarshaller" />
<Method name="unmarshallStructured" />
<Bug pattern="BC_UNCONFIRMED_CAST" />
</Match>
<!-- We want the content to be restored to the default vaue of null -->
<Match>
<Class name="software.amazon.awssdk.http.DefaultSdkHttpFullResponse" />
<Field name="content" />
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
</Match>
<!-- Don't understand why these are bugs -->
<Match>
<Class name="software.amazon.awssdk.services.protocolec2.DefaultProtocolEc2AsyncClient" />
<Method name="init" />
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" />
</Match>
<Match>
<Class name="software.amazon.awssdk.services.protocolec2.DefaultProtocolEc2Client" />
<Method name="init" />
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" />
</Match>
</FindBugsFilter>