-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathspotbugs-exclude.xml
executable file
·2576 lines (2239 loc) · 100 KB
/
spotbugs-exclude.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<!-- These existing KeyVault Attribute APIs return their super class rather than the actual type. -->
<Match>
<Class name="~com\.microsoft\.azure\.keyvault\.requests\.\w+Request"/>
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
</Match>
<!-- These keyvault models are already publicly released APIs with name matching the simple name of superclass -->
<Match>
<Class
name="~com\.microsoft\.azure\.keyvault\.models\.(CertificateBundle|CertificateOperation|IssuerBundle|KeyBundle|SecretBundle)"/>
<Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
</Match>
<!-- Cryptographic algorithms are publicly released APIs with incorrect name casing. -->
<Match>
<Or>
<Class name="~com\.microsoft\.azure\.keyvault\.cryptography\.algorithms\.(Aes|Rsa)(.+)"/>
<Class name="~com\.microsoft\.azure\.keyvault\.cryptography\.(.+)Algorithm"/>
</Or>
<Method name="~(CreateDecryptor|CreateEncryptor)"/>
<Bug pattern="NM_METHOD_NAMING_CONVENTION"/>
</Match>
<!-- KeyVaultKey.DecryptResultTransform and SignResultTransform were not created with the
intention that a null could be passed in. In the original code, it would have thrown a
NullReferenceException. -->
<Match>
<Class name="~com\.microsoft\.azure\.keyvault\.extensions\.KeyVaultKey\$[\w]+"/>
<Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE"/>
</Match>
<!-- Ignoring dropped exception and catch Exception because it existed in current SDK when migrated. -->
<Match>
<Class name="~com\.microsoft\.azure\.keyvault\.extensions\.CachingKeyResolver\$[0-9]+"/>
<Method name="run"/>
<Bug pattern="DE_MIGHT_IGNORE"/>
</Match>
<!-- Protected field already exists in the public API surface area even though it is unused. -->
<Match>
<Class name="com.microsoft.azure.keyvault.cryptography.EcKey"/>
<Field name="defaultEncryptionAlgorithm"/>
<Bug pattern="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD"/>
</Match>
<!-- Defines native api, doesn't follow java style.-->
<Match>
<Class name="~com\.azure\.identity\.implementation\.WindowsCredentialApi(.+)"/>
<Bug pattern="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD,
UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD,
NM_FIELD_NAMING_CONVENTION"/>
</Match>
<!-- Internal implementation details, not at risk.-->
<Match>
<Class name="~com\.azure\.identity\.implementation\.intellij\.IntelliJKdbxMetadata"/>
<Bug pattern="EI_EXPOSE_REP,
EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="~com\.azure\.identity\.implementation\.intellij\.IntelliJKdbxDatabase"/>
<Bug pattern="NP_NULL_ON_SOME_PATH"/>
</Match>
<!-- Third party source code files, kept as it is.-->
<Match>
<Class name="~com\.azure\.identity\.implementation\.intellij\.LittleEndianDataInputStream"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
</Match>
<Match>
<Class name="~com\.azure\.identity\.implementation\.intellij\.Salsa20"/>
<Bug pattern="DM_DEFAULT_ENCODING"/>
</Match>
<!-- Exception needs to be caught here.-->
<Match>
<Class name="~com\.azure\.identity\.implementation\.VisualStudioCacheAccessor"/>
<Bug pattern="REC_CATCH_EXCEPTION"/>
</Match>
<!-- Exception needs to be caught here.-->
<Match>
<Class name="~com\.azure\.identity\.IntelliJCredential"/>
<Bug pattern="REC_CATCH_EXCEPTION"/>
</Match>
<!-- Accesses native api, doesn't follow java style.-->
<Match>
<Class name="~com\.azure\.identity\.implementation\.LinuxKeyRingAccessor(.+)"/>
<Bug pattern="UWF_UNWRITTEN_FIELD"/>
</Match>
<!-- Accesses native api, doesn't follow java style.-->
<Match>
<Class name="com.azure.identity.implementation.WindowsCredentialAccessor"/>
<Bug pattern="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD"/>
</Match>
<!-- Public field already exists in the public API surface. -->
<Match>
<Class name="com.microsoft.azure.batch.auth.BatchUserTokenCredentials"/>
<Method name="username"/>
<Bug pattern="NM_CONFUSING"/>
</Match>
<!-- These KeyVault classes are publicly released APIs that intentionally return null rather than an empty array. -->
<Match>
<Class name="~com\.microsoft\.azure\.keyvault\.(cryptography|models|webkey)\.[\w]+"/>
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
</Match>
<!-- Cases where null arrays should return null instead of empty arrays -->
<Match>
<Or>
<Class name="com.azure.core.util.Base64Url"/>
<Class name="com.azure.core.util.CoreUtils"/>
<Class name="com.azure.core.implementation.serializer.HttpResponseDecodeData"/>
<Class name="com.azure.core.util.serializer.JacksonAdapter"/>
<And>
<Class name="com.microsoft.azure.servicebus.Utils"/>
<Method name="getDataFromMessageBody"/>
</And>
<And>
<Class name="com.azure.security.keyvault.keys.implementation.Base64UrlJsonDeserializer"/>
<Method name="deserialize"/>
</And>
<And>
<Class name="com.azure.security.keyvault.keys.implementation.ByteExtensions"/>
<Method name="clone"/>
</And>
<And>
<Class name="com.azure.security.keyvault.keys.models.KeyProperties"/>
<Method name="decode"/>
</And>
<And>
<Class name="com.azure.security.keyvault.certificates.models.webkey.Base64UrlJsonDeserializer"/>
<Method name="deserialize"/>
</And>
<And>
<Class name="com.azure.security.keyvault.certificates.models.webkey.ByteExtensions"/>
<Method name="clone"/>
</And>
<And>
<Class name="com.azure.security.keyvault.certificates.models.CertificateProperties"/>
<Method name="getX509Thumbprint"/>
</And>
</Or>
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
</Match>
<!--False positive: https://github.com/spotbugs/spotbugs/issues/1219-->
<Match>
<Class name="com.azure.core.implementation.jackson.ObjectMapperShim"/>
<Method name="createJsonMapper"/>
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
</Match>
<!-- Suppress non-null warning in the case that we change the code and it is possible for
KeyVaultCredentials.getAuthenticationCredentials to return null. -->
<Match>
<Or>
<Class name="com.azure.core.util.CoreUtils"/> <!-- false positive -->
<Class name="com.microsoft.azure.keyvault.authentication.KeyVaultCredentials"/>
<Class name="com.azure.storage.blob.FileTransferExample"/>
</Or>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<!-- Suppress Redundant nullcheck error for JreCertificates$JREKeyStore.loadKeyStore(KeyStore). -->
<Match>
<Or>
<Class name="com.azure.security.keyvault.jca.implementation.JREKeyStoreFactory"/> <!-- false positive -->
</Or>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<Match>
<Or>
<Class name="com.azure.core.util.CoreUtils"/> <!-- false positive -->
</Or>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/>
</Match>
<!-- These KeyVaultClientBase methods are made synchronous by blocking and waiting for a result. They do not return
anything, so it can be ignored. -->
<Match>
<Class name="com.microsoft.azure.keyvault.implementation.KeyVaultClientBaseImpl"/>
<Method name="~(purgeDeletedCertificate|purgeDeletedKey|purgeDeletedSecret|purgeDeletedStorageAccount)"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
</Match>
<!-- These autorest generated APIs for existing Azure SDK components supports Java 7. Suppressing error for using
anonymous inner classes. -->
<Match>
<Class name="~com\.microsoft\.azure\.(.+)Impl"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
<!-- KeyVaultCredential values manipulated do not need to be localised. They are base64 encoded or URL encoded.-->
<Match>
<Class name="com.microsoft.azure.keyvault.authentication.KeyVaultCredentials"/>
<Method name="~(extractChallenge|isValidChallenge|supportsMessageProtection)"/>
<Bug pattern="DM_CONVERT_CASE"/>
</Match>
<!-- HTTP header, "content-type" is not localised. -->
<Match>
<Class name="com.microsoft.azure.keyvault.messagesecurity.HttpMessageSecurity"/>
<Method name="unprotectResponse"/>
<Bug pattern="DM_CONVERT_CASE"/>
</Match>
<!-- HTTP header, "ocp-date" is not localised. -->
<Match>
<Class name="com.microsoft.azure.batch.auth.BatchSharedKeyCredentialsInterceptor"/>
<Method name="signHeader"/>
<Bug pattern="DM_CONVERT_CASE"/>
</Match>
<!-- Known issue in autorest where it will generate a variable with a value of null.
https://github.com/Azure/autorest.java/issues/324 -->
<Match>
<Or>
<Class name="~com\.microsoft\.azure\.(.+)Impl"/>
<Class name="~com\.azure\.(.+)Impl"/>
<Class name="com.azure.core.util.CoreUtils"/>
</Or>
<Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE"/>
</Match>
<!-- Public field already exists in the public API surface area even though no writes were seen to this public field.
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/BatchOptions.java#L50
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/BatchOptions.java#L57 -->
<Match>
<Class name="com.microsoft.azure.eventhubs.BatchOptions"/>
<Field name="~(maxMessageSize|partitionKey)"/>
<Bug pattern="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD"/>
</Match>
<!-- Public method already exists in the public API surface area even though it has confusing name.
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/MessageReceiver.java#L247
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/MessageReceiver.java#L251
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/MessagingFactory.java#L146 -->
<Match>
<Class name="~com\.microsoft\.azure\.eventhubs\.impl\.(MessageReceiver|MessagingFactory)"/>
<Bug pattern="NM_CONFUSING"/>
</Match>
<!-- Returning a new copy of the object is not necessary
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/EventHubRuntimeInformation.java#L62 -->
<Match>
<Class name="com.microsoft.azure.eventhubs.EventHubRuntimeInformation"/>
<Method name="~(getPartitionIds|onConnectionInit)"/>
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
</Match>
<!-- EventHubRuntimeInformation is populated by the service. There is no user input. Copying partitionId contents is
not necessary.
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/EventHubRuntimeInformation.java#L27 -->
<Match>
<Class name="com.microsoft.azure.eventhubs.EventHubRuntimeInformation"/>
<Field name="partitionIds"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<!-- Public field already exists in the public API surface area even though it should be final.
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/EventHubClientImpl.java#L41 -->
<Match>
<Class name="com.microsoft.azure.eventhubs.impl.EventHubClientImpl"/>
<Field name="USER_AGENT"/>
<Bug pattern="MS_SHOULD_BE_FINAL,UWF_NULL_FIELD"/>
</Match>
<!-- Values are initialized at runtime
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/EventHubClientImpl.java#L47 -->
<Match>
<Class name="com.microsoft.azure.eventhubs.impl.EventHubClientImpl"/>
<Field name="~(sender|timer|underlyingFactory)"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<!-- Returning a new copy of the object is not necessary
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ReplayableWorkItem.java#L35 -->
<Match>
<Class name="com.microsoft.azure.eventhubs.impl.ReplayableWorkItem"/>
<Field name="amqpMessage"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<!-- Return value is fine to not check, if add, it will be a redundant step
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/FaultTolerantObject.java#L80
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/FaultTolerantObject.java#L123 -->
<Match>
<Class name="~com\.microsoft\.azure\.eventhubs\.impl\.FaultTolerantObject(\$(1|2))?"/>
<Method name="~(onEvent|runOnOpenedObject|close)"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
</Match>
<!-- Bytes array are designed to return null if it is null
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/EventDataImpl.java#L150
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/PartitionReceiverImpl.java#L278 -->
<Match>
<Class name="~com\.microsoft\.azure\.eventhubs\.impl\.(EventDataImpl|PartitionReceiverImpl)"/>
<Method name="~(getBytes|getDesiredCapabilities)"/>
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
</Match>
<!-- EventHubClientImpl.USER_AGENT is public and can be set by consumers of the SDK to not be null.
https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ConnectionHandler.java#L88 -->
<Match>
<Class name="com.microsoft.azure.eventhubs.impl.ConnectionHandler"/>
<Method name="onConnectionInit"/>
<Bug pattern="UWF_NULL_FIELD"/>
</Match>
<!-- Unchecked cast already exists as inner class of a public class but they are logically correct so it can be ignored.
https://github.com/Azure/azure-sdk-for-java/blob/master/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/PartitionManager.java#L323 -->
<Match>
<Class name="com.microsoft.azure.eventprocessorhost.PartitionManager$FinalException"/>
<Method name="getInner"/>
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
</Match>
<!-- Even though volatile reference to an array exists in protected API surface area changing it will cause another public API surface to change.
https://github.com/Azure/azure-sdk-for-java/blob/master/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/PartitionManager.java#L29 -->
<Match>
<Class name="com.microsoft.azure.eventprocessorhost.PartitionManager"/>
<Field name="partitionIds"/>
<Bug pattern="VO_VOLATILE_REFERENCE_TO_ARRAY"/>
</Match>
<!-- Unchecked cast already exists in the public API surface area, they are logically right, so it can be ignored.
At AzureStorageCheckpointLeaseManager.java:[line 180,430,446,542,574]
https://github.com/Azure/azure-sdk-for-java/blob/master/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/AzureStorageCheckpointLeaseManager.java#L180
At InMemoryLeaseManager.java:[line 148,155,209,241,268]
https://github.com/Azure/azure-sdk-for-java/blob/master/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/InMemoryLeaseManager.java#L155 -->
<Match>
<Class
name="~com\.microsoft\.azure\.eventprocessorhost\.(AzureStorageCheckpointLeaseManager|InMemoryLeaseManager)"/>
<Bug pattern="BC_UNCONFIRMED_CAST"/>
</Match>
<!-- Public inner class already exists in the public API surface area even though it should be static.
At EventProcessorOptions.java:[lines 234-237]
https://github.com/Azure/azure-sdk-for-java/blob/master/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/EventProcessorOptions.java#L234 -->
<Match>
<Class
name="~com\.microsoft.azure\.eventprocessorhost\.EventProcessorOptions\$(EndOfStreamInitialPositionProvider|StartOfStreamInitialPositionProvider)"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC"/>
</Match>
<!-- EventProcessorHost and ExceptionReceivedEventArgs are shipped with method in its public surface area.
https://github.com/Azure/azure-sdk-for-java/blob/master/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/EventProcessorHost.java#L346 -->
<Match>
<Class name="com.microsoft.azure.eventprocessorhost.EventProcessorHost"/>
<Method name="getHostName"/>
<Bug pattern="NM_CONFUSING"/>
</Match>
<!-- Known issue in autorest where it will generate a variable with a value of null then use it in a not null check.
https://github.com/Azure/autorest.java/issues/328 -->
<Match>
<Or>
<Class name="~com\.microsoft\.azure\.batch\.protocol\.implementation\.[\w]+Impl"/>
</Or>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/>
</Match>
<Match>
<Class name="com.microsoft.azure.batch.CreateTasksErrorException"/>
<Or>
<Field name="failureTaskList"/>
<Field name="pendingTaskList"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<!-- No need to implements cloneable. -->
<Match>
<Or>
<Class name="com.azure.core.http.HttpPipelineNextPolicy"/>
<Class name="com.azure.core.http.HttpRequest"/>
</Or>
<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
</Match>
<!-- Uninitialized subscription property will be initialized on onSubscribe(). Spotbugs is unaware of reactor execution orders. -->
<Match>
<Or>
<Class name="com.azure.core.util.FluxUtil"/>
<Class name="com.azure.core.util.FluxUtil$1"/>
<Class name="com.azure.core.implementation.FileWriteSubscriber"/>
</Or>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<!-- There is no need to make serializer or deserializer classes serializable. Suppress bugs related to these classes.
-->
<Match>
<Class
name="~com\.azure\.core\.implementation\.serializer\.jackson\.(AdditionalPropertiesDeserializer|AdditionalPropertiesSerializer|FlatteningDeserializer|FlatteningSerializer)"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<!-- The casting problems do not exist in Azure use cases -->
<Match>
<Class name="com.azure.core.implementation.TypeUtil"/>
<Bug pattern="BC_UNCONFIRMED_CAST"/>
</Match>
<!-- The fields are checked for null in the build method and throw exceptions if values for fields are not specified. -->
<Match>
<Class name="com.azure.identity.InteractiveBrowserCredentialBuilder"/>
<Field name="port"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<!-- The major fields of poll strategy data subclass are non-serializable, and there is another design for serializing
the class proposed. Suppress the warning for current design. -->
<Match>
<Class
name="~com\.azure\.core\.management\.(CompletedPollStrategy\$CompletedPollStrategyData|ProvisioningStatePollStrategy\$ProvisioningStatePollStrategyData)"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<!-- The major fields of poll strategy data subclass are non-serializable, and there is another design for serializing
the class proposed. Suppress the warning for current design. -->
<Match>
<Class
name="~com\.azure\.core\.management\.implementation\.(CompletedPollStrategy\$CompletedPollStrategyData|ProvisioningStatePollStrategy\$ProvisioningStatePollStrategyData)"/>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<!-- The checked field is always not null. -->
<Match>
<Class name="com.azure.core.management.implementation.AzureProxy"/>
<Bug pattern="NP_NULL_PARAM_DEREF"/>
</Match>
<!-- The switch cases are encoded version of all SAS query parameters, which will further be appended to a request URL it seems like. A default case wouldn't make sense -->
<Match>
<Class name="com.microsoft.azure.storage.blob.SASQueryParameters"/>
<Bug pattern="SF_SWITCH_NO_DEFAULT"/>
</Match>
<!-- The field is used in public Constructor. -->
<Match>
<Class name="com.microsoft.azure.storage.blob.RequestIDFactory$RequestIDPolicy"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- Exclude the files generated by auto rest -->
<Match>
<Package name="~com\.microsoft\.azure\.storage\.blob\.model(.+)"/>
</Match>
<!-- Exclude the confusing name bugs as it is designed to name the same as autorest. -->
<Match>
<Or>
<Class name="com.azure.storage.blob.HttpGetterInfo"/>
<Class name="com.azure.storage.blob.BlobProperties"/>
<Class name="com.azure.storage.blob.BlobContainerProperties"/>
<Class name="com.azure.storage.file.share.implementation.models.DirectoryCreateHeaders"/>
<Class name="com.azure.storage.blob.implementation.models.BlobDownloadHeaders"/>
<Class name="com.azure.storage.blob.models.BlobQueryHeaders"/>
</Or>
<Bug pattern="NM_CONFUSING"/>
</Match>
<!-- The public field already exists in the public API surface area -->
<Match>
<Class name="~com\.microsoft\.azure\.servicebus\.(TransactionContext|management\.ManagementClientConstants)"/>
<Field name="~(MAX_DURATION|NULL_TXN)"/>
<Bug pattern="MS_SHOULD_BE_FINAL"/>
</Match>
<!-- The HttpRequest fields are serializable. Flux<T> and HttpHeaders are able to serialize and deserialize. -->
<Match>
<Class name="com.azure.core.http.HttpRequest"/>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<!-- Storing HttpResponseError as the Object value is not required to be serializable or transient -->
<Match>
<Class name="com.azure.core.exception.HttpResponseException"/>
<Bug pattern="SE_BAD_FIELD_STORE"/>
</Match>
<!-- The two values can still change in the future. Change it will be a breaking code change.-->
<Match>
<Class name="com.microsoft.azure.servicebus.MessageReceiver"/>
<Bug pattern="DB_DUPLICATE_BRANCHES"/>
</Match>
<!-- The return value is ignored for purpose -->
<Match>
<Class name="~com\.microsoft\.azure\.servicebus\.primitives\.(AsyncUtil|RequestResponseLink\$InternalReceiver)"/>
<Method name="~(completeFuture|completeFutureExceptionally|run|onReceiveComplete)"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
</Match>
<!-- Unreachable Path -->
<Match>
<Class name="com.microsoft.azure.servicebus.primitives.RequestResponseLink$InternalSender"/>
<Local name="encodedPair"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION"/>
</Match>
<!-- The casting is correct, it is beyond the SpotBugs's ability to determine the correctness -->
<Match>
<Class name="com.microsoft.azure.servicebus.primitives.RequestResponseUtils"/>
<Method name="encodeRuleDescriptionToMap"/>
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
</Match>
<!-- Unstable implementation. It is in Service team's to-do-list -->
<Match>
<Class name="com.microsoft.azure.servicebus.primitives.CoreMessageReceiver"/>
<Method name="onReceiveComplete"/>
<Bug pattern="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION"/>
</Match>
<!-- Incorrect flagging, the surrounding hasValue() checks that get() isn't null -->
<Match>
<Class name="com.azure.core.http.rest.RestProxy"/>
<Method name="endTracingSpan"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Incorrect flagging, error will be thrown if value is null -->
<Match>
<Class name="com.azure.endtoend.identity.WebJobsIdentityTest"/>
<Or>
<Method name="testMSIEndpointWithSystemAssigned"/>
<Method name="testMSIEndpointWithUserAssigned"/>
</Or>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Incorrect flagging, if the response is null a StorageException would have been thrown -->
<Match>
<Or>
<Class name="com.azure.storage.blob.specialized.BlobInputStream"/>
<Class name="com.azure.storage.file.share.StorageFileInputStream"/>
<Class name="com.azure.storage.blob.specialized.BlobOutputStream$AppendBlobOutputStream"/>
<Class name="com.azure.storage.queue.QueueServiceClient"/>
</Or>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Incorrect flagging, all the optional values can be null -->
<Match>
<Class name="com.azure.storage.blob.BlobClient"/>
<Method name="downloadToFile"/>
<Bug pattern="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS"/>
</Match>
<!-- Super doesn't need to be cloned since it is Object -->
<Match>
<Class name="com.azure.core.util.Configuration"/>
<Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
</Match>
<!-- Jackson property setter method is private -->
<Match>
<Or>
<Class name="com.azure.security.keyvault.secrets.models.DeletedSecret"/>
<Class name="com.azure.security.keyvault.secrets.models.KeyVaultSecret"/>
<Class name="com.azure.security.keyvault.secrets.models.SecretProperties"/>
<Class name="com.azure.security.keyvault.keys.models.DeletedKey"/>
<Class name="com.azure.security.keyvault.keys.cryptography.SecretKey"/>
<Class name="com.azure.security.keyvault.keys.models.KeyVaultKey"/>
<Class name="com.azure.security.keyvault.keys.models.KeyProperties"/>
<Class name="com.azure.security.keyvault.certificates.models.DeletedCertificate"/>
<Class name="com.azure.security.keyvault.certificates.models.Certificate"/>
<Class name="com.azure.security.keyvault.certificates.models.CertificateProperties"/>
<Class name="com.azure.security.keyvault.certificates.models.IssuerProperties"/>
<Class name="com.azure.security.keyvault.certificates.models.CertificateIssuer"/>
<Class name="com.azure.security.keyvault.certificates.models.CertificatePolicy"/>
<Class name="com.azure.security.keyvault.certificates.models.LifetimeAction"/>
<Class name="com.azure.security.keyvault.certificates.models.CertificateOperation"/>
</Or>
<Bug pattern="UPM_UNCALLED_PRIVATE_METHOD"/>
</Match>
<Match>
<Or>
<Class name="com.azure.core.util.polling.PollResponseJavaDocCodeSnippets"/>
<Class name="com.azure.core.util.polling.PollerJavaDocCodeSnippets"/>
</Or>
<Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE,NP_ALWAYS_NULL,UPM_UNCALLED_PRIVATE_METHOD"/>
</Match>
<!-- Field initialized by jackson property annotation -->
<Match>
<Class name="com.azure.security.keyvault.keys.models.webkey.JsonWebKey"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>
<!-- It is fine to have un-used variables, unread fields, anonymous static inner classes in javadoc code samples. -->
<Match>
<Or>
<Class name="~.*JavaDoc(CodeSnippets|CodeSamples|Samples)"/>
<Class name="~.*ReadmeSamples"/>
<Class name="com.azure.storage.blob.batch.ReadmeCodeSamples"/>
<Class name="com.azure.storage.file.datalake.GetSetAccessControlExample"/>
</Or>
<Bug pattern="DLS_DEAD_LOCAL_STORE,
URF_UNREAD_FIELD,
SIC_INNER_SHOULD_BE_STATIC_ANON,
DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD,
NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS,
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- These methods are called, SpotBugs just can't see through the specific lambda and static class code -->
<Match>
<Or>
<Class
name="com.azure.data.appconfiguration.credentials.ConfigurationClientCredentials$AuthorizationHeaderProvider"/>
<Class name="com.azure.messaging.eventhubs.EventData$SystemProperties"/>
<Class name="com.azure.messaging.eventhubs.implementation.ReactorSender$WeightedDeliveryTag"/>
</Or>
<Bug pattern="UPM_UNCALLED_PRIVATE_METHOD"/>
</Match>
<!-- This is a false positive. Exception is thrown and caught to map to a different type of exception-->
<Match>
<Or>
<Class name="com.azure.messaging.eventhubs.PartitionPumpManager"/>
</Or>
<Bug pattern="REC_CATCH_EXCEPTION"/>
</Match>
<!-- Names defined in the service. -->
<Match>
<Class name="com.azure.data.appconfiguration.models.ConfigurationSetting"/>
<Bug pattern="NM_CONFUSING"/>
</Match>
<!-- This is a false positive, it is possible for usingUserDelegation to be false. -->
<Match>
<Class name="com.azure.storage.blob.specialized.BlobServiceSasSignatureValues"/>
<Bug pattern="UC_USELESS_CONDITION"/>
</Match>
<!-- Retry thus does not throw.
SharedTokenCacheCredential needs to catch any catch exception that gets thrown.-->
<Match>
<Or>
<Class name="com.azure.identity.SharedTokenCacheCredential"/>
<Class name="com.azure.identity.implementation.msalextensions.CacheLock"/>
</Or>
<Bug pattern="REC_CATCH_EXCEPTION"/>
</Match>
<!-- Return value not needed -->
<Match>
<Class name="com.azure.identity.implementation.msalextensions.cachepersister.windows.WindowsDPAPICacheProtector"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
</Match>
<!-- Serializers define non-transient non-serializable instance field -->
<Match>
<Or>
<Class name="com.azure.core.implementation.jackson.FlatteningSerializer"/>
<Class name="com.azure.core.implementation.jackson.FlatteningDeserializer"/>
<Class name="com.azure.core.implementation.jackson.AdditionalPropertiesSerializer"/>
<Class name="com.azure.core.implementation.jackson.AdditionalPropertiesDeserializer"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>
<!-- FIXME: spotbugs issues in core test packages -->
<Match>
<Or>
<Package name="com.azure.core.test"/>
<Package name="com.azure.core.test.implementation"/>
<Package name="com.azure.core.test.http"/>
</Or>
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING,
DM_CONVERT_CASE,
EC_UNRELATED_TYPES,
REC_CATCH_EXCEPTION,
DM_DEFAULT_ENCODING,
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE,
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE,
UPM_UNCALLED_PRIVATE_METHOD"/>
</Match>
<!-- The field is read by parent class StorageOutputStream methods. -->
<Match>
<Class name="com.azure.storage.file.share.StorageFileOutputStream"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- Initial implementation of Storage Blob Batch is using an inline class -->
<Match>
<Class name="com.azure.storage.blob.batch.BlobBatchAsyncClient"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
<!-- Implementation name confusing with public API name and non-public API -->
<Match>
<Or>
<Class name="com.azure.core.implementation.http.UrlBuilder"/>
<Class name="com.azure.storage.blob.implementation.models.AppendBlobAppendBlockFromUrlHeaders"/>
<Class name="com.azure.storage.file.share.implementation.models.FileGetPropertiesHeaders"/>
<Class name="com.azure.storage.file.datalake.implementation.models.PathAppendDataHeaders"/>
</Or>
<Bug pattern="NM_CONFUSING"/>
</Match>
<!-- Incorrect flagging, there is already switchIfEmpty operator applied in the upstream to throw error on empty -->
<Match>
<Class name="com.azure.core.util.polling.DefaultSyncPoller"/>
<Method name="getFinalResult"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Incorrect flagging, there is already switchIfEmpty operator applied in the upstream to throw error on empty -->
<Match>
<Class name="com.azure.core.util.polling.DefaultSyncPoller"/>
<Method name="poll"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Incorrect flagging, there is already switchIfEmpty operator applied in the upstream to throw error on empty -->
<Match>
<Class name="com.azure.core.util.polling.DefaultSyncPoller"/>
<Method name="waitForCompletion"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Incorrect flagging, there is already switchIfEmpty operator applied in the upstream to throw error on empty -->
<Match>
<Class name="com.azure.core.util.polling.DefaultSyncPoller"/>
<Method name="waitUntil"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Incorrect flagging, there is already switchIfEmpty operator applied in the upstream to throw error on empty -->
<Match>
<Class name="com.azure.core.util.polling.PollingContext"/>
<Method name="clone"/>
<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
</Match>
<Match>
<Or>
<Class name="com.azure.core.util.paging.PagedFluxCoreJavaDocCodeSnippets"/>
</Or>
<Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE,
SIC_INNER_SHOULD_BE_STATIC_ANON,
UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS,
NP_BOOLEAN_RETURN_NULL"/>
</Match>
<!-- Disable some spotbugs rules on perf-tests -->
<Match>
<Or>
<Package name="com.azure.storage.blob.perf"/>
<Package name="com.azure.storage.blob.perf.core"/>
<Package name="com.azure.storage.file.datalake.perf"/>
<Package name="com.azure.storage.file.datalake.perf.core"/>
<Package name="com.azure.storage.file.share.perf"/>
<Package name="com.azure.storage.file.share.perf.core"/>
</Or>
<Bug pattern="BC_UNCONFIRMED_CAST, DM_EXIT, RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
</Match>
<Match>
<Package name="com.azure.sdk.template.perf"/>
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
</Match>
<!-- StringUtils.strip can return NULL so the NULL check is required -->
<Match>
<Class name="com.azure.cosmos.implementation.PathsHelper"/>
<Method name="parsePathSegments"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<Match>
<Class name="com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256Algorithm"/>
<Method name="decryptData"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<Match>
<Class name="com.azure.cosmos.implementation.encryption.AeadAes256CbcHmac256Algorithm"/>
<Method name="encryptData"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<Match>
<Class name="com.azure.cosmos.implementation.BaseAuthorizationTokenProvider"/>
<Method name="reInitializeIfPossible"/>
<Bug pattern="ES_COMPARING_STRINGS_WITH_EQ"/>
</Match>
<Match>
<Class name="com.azure.cosmos.implementation.encryption.SecurityUtility"/>
<Method name="getSHA256Hash"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<!-- Suppress false positive, there is no null in the flagged code -->
<Match>
<Class name="com.azure.cosmos.implementation.TestConfigurations"/>
<Method name="loadFromPathIfExists"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE,REC_CATCH_EXCEPTION"/>
</Match>
<!-- ClassLoader::getResourceAsStream can return null, ref: https://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html -->
<Match>
<Class name="com.azure.cosmos.implementation.directconnectivity.RntbdTransportClient$Options$Builder"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>
<!-- Tracking work-item: https://github.com/Azure/azure-sdk-for-java/issues/9037 -->
<Match>
<Or>
<Class name="com.azure.cosmos.implementation.ClientSideRequestStatistics"/>
<Class name="com.azure.cosmos.models.CosmosItemResponse"/>
</Or>
<Bug pattern="IS2_INCONSISTENT_SYNC"/>
</Match>
<!-- The following two suggestion for _static_ inner class is suppressed,
first method is 1 line and second one is ~4 lines, doesn't worth a dedicated class.
-->
<Match>
<Class name="com.azure.cosmos.implementation.routing.LocationCache"/>
<Method name="markEndpointUnavailable"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
<Match>
<Class name="com.azure.cosmos.implementation.DatabaseAccount"/>
<Method name="getQueryEngineConfiguration"/>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>
<!-- This code smells, created an issue: https://github.com/Azure/azure-sdk-for-java/issues/9039 -->
<Match>
<Class name="com.azure.cosmos.implementation.directconnectivity.GoneAndRetryWithRetryPolicy"/>
<Method name="shouldRetry"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
</Match>
<Match>
<Class name="com.azure.cosmos.encryption.KeyVaultAccessClient"/>
<Method name="unwrapKeyAsync"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<Match>
<Class name="com.azure.cosmos.encryption.KeyVaultAccessClient"/>
<Method name="wrapKeyAsync"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<Match>
<Class name="com.azure.cosmos.encryption.AzureKeyVaultKeyWrapProvider"/>
<Method name="unwrapKey"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<Match>
<Class name="com.azure.cosmos.encryption.AzureKeyVaultKeyWrapProvider"/>
<Method name="wrapKey"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- DB is retrieved synchronously (Flux::block()) after creating it, so no chance of null -->
<Match>
<Class name="com.azure.cosmos.implementation.DatabaseForTest"/>
<Method name="create"/>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<!-- Issue: https://github.com/Azure/azure-sdk-for-java/issues/9041 -->
<Match>
<Class name="com.azure.cosmos.implementation.RxGatewayStoreModel"/>
<Bug pattern="NP_NULL_ON_SOME_PATH"/>
</Match>
<!-- Issue: https://github.com/Azure/azure-sdk-for-java/issues/9044 -->
<Match>
<Class name="com.azure.cosmos.implementation.RxGatewayStoreModel"/>
<Method name="validateOrThrow"/>
<Bug pattern="DM_DEFAULT_ENCODING"/>
</Match>
<!-- The in-memory map is not serializable, given value is of type IServerIdentity which is not serializable -->
<Match>
<Class name="com.azure.cosmos.implementation.routing.InMemoryCollectionRoutingMap$MinPartitionKeyPairComparator"/>
<Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE"/>
</Match>
<!-- The following 3 suppression are valid, the types uses default value if parse fails -->
<Match>
<Class name="com.azure.cosmos.implementation.Configs"/>
<Method name="getIntValue"/>
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING"/>
</Match>
<Match>
<Class name="com.azure.cosmos.implementation.Integers"/>
<Method name="tryParse"/>
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING"/>
</Match>
<Match>
<Class name="com.azure.cosmos.implementation.Longs"/>
<Method name="tryParse"/>
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING"/>
</Match>
<!-- Issue: https://github.com/Azure/azure-sdk-for-java/issues/9048 -->
<Match>
<Class name="com.azure.cosmos.models.ModelBridgeInternal"/>
<Method name="toDatabaseAccount"/>
<Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING"/>
</Match>
<!-- Extra null check is for assertion -->
<Match>
<Class name="com.azure.cosmos.implementation.directconnectivity.AddressResolver"/>
<Method name="~(.*)\$(resolveAddressesAndIdentityAsync|null)\$(.*)"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/>
</Match>
<!-- Issue: https://github.com/Azure/azure-sdk-for-java/issues/9050 -->
<Match>
<Class name="com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdClientChannelPool"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/>
</Match>
<!-- Code is doing DCL, this needs to be evaluated
https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
Issue: https://github.com/Azure/azure-sdk-for-java/issues/9054
-->
<Match>
<Class name="com.azure.cosmos.models.CosmosItemResponse"/>
<Method name="getItem"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"/>
</Match>
<!-- Fallthrough is by design -->
<Match>
<Class name="com.azure.cosmos.implementation.routing.MurmurHash3_32"/>
<Method name="hash"/>
<Bug pattern="SF_SWITCH_FALLTHROUGH"/>
</Match>
<!-- Suppress URF_UNREAD_FIELD, the fields are read but during serialization -->
<Match>
<Class name="com.azure.cosmos.implementation.ClientSideRequestStatistics$AddressResolutionStatistics"/>
<Field name="endTimeUTC"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- Suppress URF_UNREAD_FIELD, the fields are read but during serialization -->
<Match>
<Class name="com.azure.cosmos.implementation.ClientSideRequestStatistics$AddressResolutionStatistics"/>
<Field name="startTimeUTC"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- Suppress URF_UNREAD_FIELD, the fields are read but during serialization -->
<Match>
<Class name="com.azure.cosmos.implementation.ClientSideRequestStatistics$AddressResolutionStatistics"/>
<Field name="targetEndpoint"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- Suppress URF_UNREAD_FIELD, the fields are read but during serialization -->
<Match>
<Class name="com.azure.cosmos.implementation.ClientSideRequestStatistics$AddressResolutionStatistics"/>
<Field name="errorMessage"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- Suppress URF_UNREAD_FIELD, the fields are read but during serialization -->
<Match>
<Class name="com.azure.cosmos.implementation.ClientSideRequestStatistics$AddressResolutionStatistics"/>
<Field name="inflightRequest"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- Suppress URF_UNREAD_FIELD, the fields are read but during serialization -->