Skip to content

Commit 3bc7416

Browse files
Copilottrask
andauthored
Fix SpotBugs 6.2.1 compatibility by configuring tasks to ignore missing class failures (#4252)
Co-authored-by: Trask Stalnaker <[email protected]>
1 parent 4cf74ca commit 3bc7416

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/AppInsightsCertificate.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
package com.microsoft.applicationinsights.agent.internal.init;
55

6-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
76
import java.io.BufferedReader;
87
import java.io.IOException;
98
import java.io.InputStream;
@@ -75,9 +74,6 @@ boolean isInJavaKeystore() {
7574
return loadedCertificates.contains(APP_INSIGHT_ROOT_CERTIFICATE);
7675
}
7776

78-
@SuppressFBWarnings(
79-
value = "SECCI", // Command Injection
80-
justification = "No user data is used to construct the command below")
8177
private String loadCertificates() {
8278
String keyStoreLocation = System.getProperty("java.home") + "/lib/security/cacerts";
8379
return executeWithoutException(

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/telemetry/BatchItemProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private static final class Worker implements Runnable {
9898
private final long exporterTimeoutNanos;
9999
private final int maxPendingExports;
100100

101-
private long nextExportTime;
101+
private volatile long nextExportTime;
102102

103103
private final Queue<TelemetryItem> queue;
104104
private final int queueCapacity;

buildSrc/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ plugins {
88
spotless {
99
java {
1010
googleJavaFormat()
11-
licenseHeaderFile(rootProject.file("../buildscripts/spotless.license.java"), "(package|import|public)")
11+
licenseHeaderFile(
12+
rootProject.file("../buildscripts/spotless.license.java"),
13+
"(package|import|public)"
14+
)
1215
target("src/**/*.java")
1316
}
1417
}
@@ -28,7 +31,7 @@ dependencies {
2831

2932
// When updating, update above in plugins too
3033
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.1.0")
31-
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.1.7")
34+
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.2.1")
3235
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.8")
3336

3437
implementation("org.owasp:dependency-check-gradle:12.1.3")

0 commit comments

Comments
 (0)