File tree 3 files changed +23
-3
lines changed
driver-core/src/main/com/mongodb/internal/connection
3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ buildscript {
25
25
}
26
26
dependencies {
27
27
classpath ' com.netflix.nebula:gradle-extra-configurations-plugin:7.0.0'
28
- classpath " com.github.spotbugs.snom:spotbugs-gradle-plugin:5 .0.13 "
28
+ classpath " com.github.spotbugs.snom:spotbugs-gradle-plugin:6 .0.15 "
29
29
classpath ' biz.aQute.bnd:biz.aQute.bnd.gradle:5.1.2'
30
30
31
31
// Scala plugins
Original file line number Diff line number Diff line change 14
14
~ limitations under the License.
15
15
-->
16
16
17
- <!-- See https://spotbugs.readthedocs.io/en/latest/filter.html#rank
17
+ <!--
18
+ To determine the rank of a newly-detected bug that you would like to exclude,
19
+ run spotbugsMain task with xml.enabled, then examine the XML report in
20
+ <module>/build/reports/spotbugs/main.xml, where the rankings are
21
+ included as part of the report, e.g.
22
+
23
+ <BugInstance type="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" priority="2" rank="16" ...
24
+
25
+ See https://spotbugs.readthedocs.io/en/latest/filter.html#rank
18
26
for the mapping from SpotBugs rank to verbal labels.
19
27
-->
20
28
<FindBugsFilter >
29
+ <Match >
30
+ <!-- MongoDB status: "No Fix Needed", SpotBugs rank: 16 -->
31
+ <Bug pattern =" CT_CONSTRUCTOR_THROW" />
32
+ </Match >
33
+
34
+ <Match >
35
+ <!-- MongoDB status: "No Fix Needed", SpotBugs rank: 16 -->
36
+ <Class name =" com.mongodb.internal.connection.tlschannel.impl.BufferHolder" />
37
+ <Bug pattern =" PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
38
+ </Match >
39
+
21
40
<Match >
22
41
<!-- MongoDB status: "No Fix Needed", SpotBugs rank: 18 -->
23
42
<Bug pattern =" EI_EXPOSE_REP,EI_EXPOSE_REP2" />
Original file line number Diff line number Diff line change 38
38
import java .util .concurrent .ConcurrentHashMap ;
39
39
import java .util .concurrent .ConcurrentMap ;
40
40
41
+ import static com .mongodb .assertions .Assertions .assertNotNull ;
41
42
import static com .mongodb .assertions .Assertions .isTrue ;
42
43
import static com .mongodb .connection .ClusterConnectionMode .MULTIPLE ;
43
44
import static com .mongodb .connection .ClusterType .UNKNOWN ;
@@ -234,7 +235,7 @@ private boolean handleReplicaSetMemberChanged(final ServerDescription newDescrip
234
235
}
235
236
236
237
if (replicaSetName == null ) {
237
- replicaSetName = newDescription .getSetName ();
238
+ replicaSetName = assertNotNull ( newDescription .getSetName () );
238
239
}
239
240
240
241
if (!replicaSetName .equals (newDescription .getSetName ())) {
You can’t perform that action at this time.
0 commit comments