Skip to content

Commit 8ea3629

Browse files
authoredDec 19, 2024··
Re-enable animalsniffer, fixing violations
In 61f19d7 I swapped the signatures to use the version catalog. But I failed to preserve the `@signature` extension and it all seemed to work... But in fact all the animalsniffer tasks were completing as SKIPPED as they lacked signatures. The build.gradle changes in this commit are to fix that while still using version catalog. But while it was broken violations crept in. Most violations weren't too important and we're not surprised went unnoticed. For example, Netty with TLS has long required the Java 8 API `setEndpointIdentificationAlgorithm()`, so using `Optional` in the same code path didn't harm anything in particular. I still swapped it to Guava's `Optional` to avoid overuse of `@IgnoreJRERequirement`. One important violation has not been fixed and instead I've disabled the android signature in api/build.gradle for the moment. The violation is in StatusException using the `fillInStackTrace` overload of Exception. This problem [had been noticed][PR11066], but we couldn't figure out what was going on. AnimalSniffer is now noticing this and agreeing with the internal linter. There is still a question of why our interop tests failed to notice this, but given they are no longer running on pre-API level 24, that may forever be a mystery. [PR11066]: #11066
1 parent f8f6139 commit 8ea3629

File tree

58 files changed

+329
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+329
-105
lines changed
 

‎alts/build.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ dependencies {
4444
classifier = "linux-x86_64"
4545
}
4646
}
47-
signature libraries.signature.java
47+
signature (libraries.signature.java) {
48+
artifact {
49+
extension = "signature"
50+
}
51+
}
4852
}
4953

5054
configureProtoCompilation()

‎api/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ java_library(
1313
artifact("com.google.errorprone:error_prone_annotations"),
1414
artifact("com.google.guava:failureaccess"), # future transitive dep of Guava. See #5214
1515
artifact("com.google.guava:guava"),
16+
artifact("org.codehaus.mojo:animal-sniffer-annotations"),
1617
],
1718
)

0 commit comments

Comments
 (0)
Please sign in to comment.