Skip to content

Commit 84710cc

Browse files
authored
[FSSDK-1135] upgrade spotbugs to 4.8.5 (#565)
1 parent f90da0c commit 84710cc

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

.github/workflows/java.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ jobs:
8383
- name: Check on failures
8484
if: always() && steps.unit_tests.outcome != 'success'
8585
run: |
86-
cat /home/runner/java-sdk/core-api/build/reports/findbugs/main.html
87-
cat /home/runner/java-sdk/core-api/build/reports/findbugs/test.html
86+
cat /Users/runner/work/java-sdk/core-api/build/reports/spotbugs/main.html
87+
cat /Users/runner/work/java-sdk/core-api/build/reports/spotbugs/test.html
8888
- name: Check on success
8989
if: always() && steps.unit_tests.outcome == 'success'
9090
run: |

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ You can run all unit tests with:
7070

7171
### Checking for bugs
7272

73-
We utilize [FindBugs](http://findbugs.sourceforge.net/) to identify possible bugs in the SDK. To run the check:
73+
We utilize [SpotBugs](https://spotbugs.github.io/) to identify possible bugs in the SDK. To run the check:
7474

7575
```
7676

build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'me.champeau.gradle.jmh' version '0.5.3'
55
id 'nebula.optional-base' version '3.2.0'
66
id 'com.github.hierynomus.license' version '0.16.1'
7-
id 'com.github.spotbugs' version "4.5.0"
7+
id 'com.github.spotbugs' version "6.0.14"
88
id 'maven-publish'
99
}
1010

@@ -73,6 +73,7 @@ configure(publishedProjects) {
7373

7474
spotbugs {
7575
spotbugsJmh.enabled = false
76+
reportLevel = com.github.spotbugs.snom.Confidence.valueOf('HIGH')
7677
}
7778

7879
test {

core-httpclient-impl/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ dependencies {
22
implementation project(':core-api')
33
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: httpClientVersion
44
implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
5+
implementation group: 'com.google.code.findbugs', name: 'annotations', version: findbugsAnnotationVersion
56
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: findbugsJsrVersion
67
testImplementation 'org.mock-server:mockserver-netty:5.1.1'
78
}

core-httpclient-impl/src/main/java/com/optimizely/ab/config/HttpProjectConfigManager.java

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.util.concurrent.ThreadFactory;
2525
import java.util.concurrent.locks.ReentrantLock;
2626
import javax.annotation.Nullable;
27+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2728
import org.apache.http.*;
2829
import org.apache.http.client.ClientProtocolException;
2930
import org.apache.http.client.methods.CloseableHttpResponse;
@@ -309,6 +310,7 @@ public Builder withPollingInterval(Long period, TimeUnit timeUnit) {
309310
return this;
310311
}
311312

313+
@SuppressFBWarnings("EI_EXPOSE_REP2")
312314
public Builder withNotificationCenter(NotificationCenter notificationCenter) {
313315
this.notificationCenter = notificationCenter;
314316
return this;

0 commit comments

Comments
 (0)