Skip to content

Commit cc65dfe

Browse files
committed
Fix ./gradlew spotlessApply and suppress warnings from Scanner in unit test
1 parent 870d3f8 commit cc65dfe

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

agent/agent-gc-monitor/gc-monitor-tests/src/test/java/com/microsoft/gcmonitortests/GcEventGenerator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public static void main(String[] args) throws InterruptedException {
2525
new GcEventGenerator().run();
2626
}
2727

28-
@SuppressWarnings("SystemOut") // legitimate use of System.out for logging/output
28+
@SuppressWarnings({
29+
"SystemOut", // legitimate use of System.out for logging/output
30+
"JdkObsolete" // Java 8 compatibility requires Scanner(InputStream, String)
31+
})
2932
private void run() throws InterruptedException {
3033
System.out.println("Hit return to start");
3134

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/configuration/ConfigurationBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,8 @@ private static String overlayConnectionStringFromEnv(
865865
return null;
866866
}
867867

868-
@SuppressWarnings("JdkObsolete") // Java 8 target does not support URLDecoder.decode(String, Charset)
868+
@SuppressWarnings(
869+
"JdkObsolete") // Java 8 target does not support URLDecoder.decode(String, Charset)
869870
private static Configuration.Proxy overlayProxyFromEnv(
870871
Configuration.Proxy proxy, Function<String, String> envVarsFunction) {
871872
String proxyEnvVar = getEnvVar(APPLICATIONINSIGHTS_PROXY, envVarsFunction);

0 commit comments

Comments
 (0)