From ab472b3c475b0ff6d1da46514e93959d57dc02e7 Mon Sep 17 00:00:00 2001 From: Suzanne Millstein Date: Mon, 18 Dec 2023 14:40:09 -0800 Subject: [PATCH] Adapt to CF's type argument inference improvements. (#78) --- guava/src/com/google/common/io/ByteSource.java | 8 ++++++-- pom.xml | 10 +++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/guava/src/com/google/common/io/ByteSource.java b/guava/src/com/google/common/io/ByteSource.java index 594e14687175..5e4fd4171fbb 100644 --- a/guava/src/com/google/common/io/ByteSource.java +++ b/guava/src/com/google/common/io/ByteSource.java @@ -558,7 +558,11 @@ public boolean isEmpty() throws IOException { } @Override - @SuppressWarnings("value:return") // off is at most equal to unslicedSize and length is non-negative + @SuppressWarnings({ + // off is at most equal to unslicedSize and length is non-negative. + "value:return", + // poly + inference problem. + "type.arguments.not.inferred"}) public Optional<@NonNegative Long> sizeIfKnown() { Optional<@NonNegative Long> optionalUnslicedSize = ByteSource.this.sizeIfKnown(); if (optionalUnslicedSize.isPresent()) { @@ -708,7 +712,7 @@ public boolean isEmpty() throws IOException { } @Override - @SuppressWarnings("value:return") // Long.MAX_VALUE is non-negative + @SuppressWarnings("value:type.arguments.not.inferred") // Long.MAX_VALUE is non-negative public Optional<@NonNegative Long> sizeIfKnown() { if (!(sources instanceof Collection)) { // Infinite Iterables can cause problems here. Of course, it's true that most of the other diff --git a/pom.xml b/pom.xml index 3b29a6619871..9daf85189217 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ %regex[.*.class] 1.1.2 - 3.41.0 + 3.43.0-SNAPSHOT 1.20 3.1.0 @@ -255,6 +255,14 @@ scp://dummy.server/dontinstall/usestaging + + + snapshots-repo + https://oss.sonatype.org/content/repositories/snapshots + false + true + +