Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 528504580
  • Loading branch information
java-team-github-bot authored and Google Java Core Libraries committed May 1, 2023
1 parent df09bab commit 3b2ad2e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion guava/src/com/google/common/hash/Hashing.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,19 @@ private static String hmacToString(String methodName, Key key) {
* @since 18.0
*/
public static HashFunction crc32c() {
return Crc32cHashFunction.CRC_32_C;
return Crc32CSupplier.HASH_FUNCTION;
}

@Immutable
private enum Crc32CSupplier implements ImmutableSupplier<HashFunction> {
ABSTRACT_HASH_FUNCTION {
@Override
public HashFunction get() {
return Crc32cHashFunction.CRC_32_C;
}
};

static final HashFunction HASH_FUNCTION = values()[0].get();
}

/**
Expand Down

0 comments on commit 3b2ad2e

Please sign in to comment.