From 747a13349be429775db0b432f7ecf5df5fdd04eb Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 25 Jun 2022 22:01:54 -0700 Subject: [PATCH 1/2] Update spotless --- benchmark-overhead/build.gradle.kts | 2 +- conventions/build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark-overhead/build.gradle.kts b/benchmark-overhead/build.gradle.kts index cd96dd889cb9..95867c78f9ac 100644 --- a/benchmark-overhead/build.gradle.kts +++ b/benchmark-overhead/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("java") - id("com.diffplug.spotless") version "6.1.2" + id("com.diffplug.spotless") version "6.7.2" } spotless { diff --git a/conventions/build.gradle.kts b/conventions/build.gradle.kts index 48271dced2e7..6b862e9574e2 100644 --- a/conventions/build.gradle.kts +++ b/conventions/build.gradle.kts @@ -1,7 +1,7 @@ plugins { `kotlin-dsl` // When updating, update below in dependencies too - id("com.diffplug.spotless") version "6.4.2" + id("com.diffplug.spotless") version "6.7.2" } spotless { @@ -39,7 +39,7 @@ dependencies { implementation("org.apache.maven:maven-aether-provider:3.3.9") // When updating, update above in plugins too - implementation("com.diffplug.spotless:spotless-plugin-gradle:6.4.2") + implementation("com.diffplug.spotless:spotless-plugin-gradle:6.7.2") implementation("com.google.guava:guava:31.1-jre") implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18") implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2") From 088b418975c79a14c91bbd309aded3160db6df10 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 25 Jun 2022 22:28:22 -0700 Subject: [PATCH 2/2] Update spotless --- .../src/main/kotlin/otel.spotless-conventions.gradle.kts | 6 ++++-- .../cache/weaklockfree/AbstractWeakConcurrentMap.java | 4 +++- .../internal/cache/weaklockfree/WeakConcurrentMap.java | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/conventions/src/main/kotlin/otel.spotless-conventions.gradle.kts b/conventions/src/main/kotlin/otel.spotless-conventions.gradle.kts index 79713db11a66..726f0a12a1e8 100644 --- a/conventions/src/main/kotlin/otel.spotless-conventions.gradle.kts +++ b/conventions/src/main/kotlin/otel.spotless-conventions.gradle.kts @@ -25,12 +25,14 @@ spotless { } plugins.withId("org.jetbrains.kotlin.jvm") { kotlin { - ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports")) + ktlint().userData(mapOf("continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports")) + .editorConfigOverride(mapOf("indent_size" to "2")) // not sure why it's not using the setting from .editorconfig licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class|// Includes work from:)") } } kotlinGradle { - ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports")) + ktlint().userData(mapOf("continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports")) + .editorConfigOverride(mapOf("indent_size" to "2")) // not sure why it's not using the setting from .editorconfig } format("misc") { // not using "**/..." to help keep spotless fast diff --git a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/AbstractWeakConcurrentMap.java b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/AbstractWeakConcurrentMap.java index dcfc9269f58e..cec85a6f9eee 100644 --- a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/AbstractWeakConcurrentMap.java +++ b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/AbstractWeakConcurrentMap.java @@ -57,7 +57,9 @@ protected AbstractWeakConcurrentMap() { this(new ConcurrentHashMap<>()); } - /** @param target ConcurrentMap implementation that this class wraps. */ + /** + * @param target ConcurrentMap implementation that this class wraps. + */ protected AbstractWeakConcurrentMap(ConcurrentMap, V> target) { this.target = target; } diff --git a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/WeakConcurrentMap.java b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/WeakConcurrentMap.java index 92ea071db4ac..0dc7b4d05df9 100644 --- a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/WeakConcurrentMap.java +++ b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/cache/weaklockfree/WeakConcurrentMap.java @@ -74,7 +74,9 @@ protected LookupKey initialValue() { private final boolean reuseKeys; - /** @param cleanerThread {@code true} if a thread should be started that removes stale entries. */ + /** + * @param cleanerThread {@code true} if a thread should be started that removes stale entries. + */ public WeakConcurrentMap(boolean cleanerThread) { this(cleanerThread, isPersistentClassLoader(LookupKey.class.getClassLoader())); } @@ -152,7 +154,9 @@ protected void resetLookupKey(LookupKey lookupKey) { lookupKey.reset(); } - /** @return The cleaner thread or {@code null} if no such thread was set. */ + /** + * @return The cleaner thread or {@code null} if no such thread was set. + */ public Thread getCleanerThread() { return thread; }