From cd37a54f076392402af6df7b80bda07d96e012c7 Mon Sep 17 00:00:00 2001 From: Chris Povirk Date: Thu, 6 Jun 2019 11:46:53 -0700 Subject: [PATCH] Extend raw ComparableSubject instead of supplying type parameters. The self-type parameter is being removed from ComparableSubject. In order to remove one type parameter while leaving the other in place, it's necessary either to make an atomic change (which is tricky for third-party code) or to temporarily remove *both* type parameters and then put the one back. This CL implements the latter. This CL will temporarily produce rawtypes warnings -- and temporarily eliminate type-checking of calls to the ComparableSubject methods -- which will go away when I remove the type parameters (as soon as this batch of CLs is submitted). This CL requires Truth 0.45. I should already have another CL out to you (perhaps even already submitted) to make other changes to prepare for Truth 0.45. PiperOrigin-RevId: 251895062 --- .../com/bumptech/glide/disklrucache/DiskLruCacheTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/third_party/disklrucache/src/test/java/com/bumptech/glide/disklrucache/DiskLruCacheTest.java b/third_party/disklrucache/src/test/java/com/bumptech/glide/disklrucache/DiskLruCacheTest.java index f7272913a..f3db6e2b5 100644 --- a/third_party/disklrucache/src/test/java/com/bumptech/glide/disklrucache/DiskLruCacheTest.java +++ b/third_party/disklrucache/src/test/java/com/bumptech/glide/disklrucache/DiskLruCacheTest.java @@ -930,7 +930,9 @@ private static void deleteDirectory(File file) { assertThat(!file.exists() || file.delete()).isTrue(); } - static final class FileSubject extends ComparableSubject { + // TODO(b/134664588): Remove after go/truth-subject-lsc + @SuppressWarnings({"rawtypes", "unchecked"}) + static final class FileSubject extends ComparableSubject { private static final Subject.Factory FACTORY = new Subject.Factory() { @Override