From f2238c779c0c7d78f4b4793cbbbf6428ad24bc15 Mon Sep 17 00:00:00 2001 From: Picnic-DevPla-Bot <168541957+Picnic-DevPla-Bot@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:06:19 +0200 Subject: [PATCH] Upgrade Guava 33.3.0-jre -> 33.3.1-jre (#1336) And drop some Refaster rules now covered by `@InlineMe` instructions. See: - https://guava.dev/releases/33.3.1-jre/api/diffs/ - https://github.com/google/guava/releases/tag/v33.3.1 - https://github.com/google/guava/compare/v33.3.0...v33.3.1 --- .../refasterrules/PrimitiveRules.java | 28 ------------------- .../PrimitiveRulesTestInput.java | 8 ------ .../PrimitiveRulesTestOutput.java | 8 ------ pom.xml | 2 +- 4 files changed, 1 insertion(+), 45 deletions(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java index 756dbb3c04..b034ec7381 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java @@ -196,34 +196,6 @@ int after(double d) { } } - /** Prefer {@link Float#compare(float, float)} over the Guava alternative. */ - // XXX: Drop this rule once https://github.com/google/guava/pull/7371 is released. - static final class FloatCompare { - @BeforeTemplate - int before(float a, float b) { - return Floats.compare(a, b); - } - - @AfterTemplate - int after(float a, float b) { - return Float.compare(a, b); - } - } - - /** Prefer {@link Double#compare(double, double)} over the Guava alternative. */ - // XXX: Drop this rule once https://github.com/google/guava/pull/7371 is released. - static final class DoubleCompare { - @BeforeTemplate - int before(double a, double b) { - return Doubles.compare(a, b); - } - - @AfterTemplate - int after(double a, double b) { - return Double.compare(a, b); - } - } - /** Prefer {@link Character#BYTES} over the Guava alternative. */ static final class CharacterBytes { @BeforeTemplate diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestInput.java index d3c8057197..419f4c9c62 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestInput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestInput.java @@ -109,14 +109,6 @@ int testDoubleHashCode() { return Doubles.hashCode(1); } - int testFloatCompare() { - return Floats.compare(1, 2); - } - - int testDoubleCompare() { - return Doubles.compare(1, 2); - } - int testCharacterBytes() { return Chars.BYTES; } diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestOutput.java index 9d3cfa9df9..f111b02839 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestOutput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PrimitiveRulesTestOutput.java @@ -109,14 +109,6 @@ int testDoubleHashCode() { return Double.hashCode(1); } - int testFloatCompare() { - return Float.compare(1, 2); - } - - int testDoubleCompare() { - return Double.compare(1, 2); - } - int testCharacterBytes() { return Character.BYTES; } diff --git a/pom.xml b/pom.xml index 4b1eef81df..a8ebbe1112 100644 --- a/pom.xml +++ b/pom.xml @@ -346,7 +346,7 @@ com.google.guava guava-bom - 33.3.0-jre + 33.3.1-jre pom import