aboutsummaryrefslogtreecommitdiff
path: root/pom.xml
diff options
context:
space:
mode:
authorcpovirk <cpovirk@google.com>2021-08-19 09:41:17 -0700
committerGoogle Java Core Libraries <java-core-libraries-team+copybara@google.com>2021-08-19 09:44:03 -0700
commitfb109b051c9ec48d5e77bf73b33a228ab5d57462 (patch)
tree5bf73cd03fa4f922b68dd832057621807c5bffca /pom.xml
parentc7d9fef73b9314581bf4acd0d97b12178935eb11 (diff)
downloadguava-fb109b051c9ec48d5e77bf73b33a228ab5d57462.tar.gz
Remove `ClassValue` implementation of `Futures.getChecked` from the Android flavor.
It doesn't work there, even under new versions of Android, so it always triggers fallback, and the process of falling back burns resources and produces noise. (JRE users of guava-android could benefit from the `ClassValue` implementation, but now that we're dropping support for Java 7 from guava-android, there's no reason for them to use it. OK, probably some users run _Robolectric_ tests against guava-android. But presumably they aren't _too_ sensitive to the performance of `getChecked` in the failure case.) Removing `ClassValue` support also lets us remove a bunch of Animal-Sniffer cruft. That includes upgrading it to 1.19, which in turn forces us to remove some usages of new APIs from our _tests_ -- not nearly as important as usages in _prod_ but still a good idea so that any future Android test failures are reported to us correctly instead of hidden by `NoSuchMethodError` or similar. Or actually, Animal-Sniffer 1.20 [turned checking of test sources back off](https://github.com/mojohaus/animal-sniffer/commit/ac40ac46b3e02f0edf986bb43be7a45cc5382937), but let's opt in anyway, at least to see how it goes, at least for the tests of guava-testlib. (guava-tests itself is more of a pain, so I left a TODO.) RELNOTES=n/a PiperOrigin-RevId: 391779058
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml20
1 files changed, 2 insertions, 18 deletions
diff --git a/pom.xml b/pom.xml
index 7bcaebbd8..87dae7e9b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,23 +16,7 @@
<test.include>%regex[.*.class]</test.include>
<truth.version>1.1.2</truth.version>
<checker-framework.version>3.12.0</checker-framework.version>
- <!--
- Upgrading to 1.19 breaks things: Animal Sniffer reports a problem with the
- use of ClassValue in FuturesGetChecked, even though we've added a
- suppression annotation.
-
- The problem might be
- https://github.com/mojohaus/animal-sniffer/issues/131.
-
- We could probably work around this with a different suppression strategy,
- perhaps (untested):
-
- <ignores><ignore>com.google.common.util.concurrent.FuturesGetChecked$GetCheckedTypeValidatorHolder$ClassValueValidator</ignore></ignores>
-
- But upgrading doesn't really buy us much, as far as I know. (1.19 does
- check test code in addition to prod code, but I don't think we care.)
- -->
- <animal.sniffer.version>1.18</animal.sniffer.version>
+ <animal.sniffer.version>1.20</animal.sniffer.version>
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -168,7 +152,7 @@
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>${animal.sniffer.version}</version>
<configuration>
- <annotations>com.google.common.util.concurrent.IgnoreJRERequirement</annotations>
+ <checkTestClasses>true</checkTestClasses>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>