Skip to content

Commit

Permalink
Follow-up to 9f2cd68
Browse files Browse the repository at this point in the history
Use `com.google.common.base.Supplier`, for compatibility with clients
that are using the Android version of Guava. Fixes e.g.

```
Exception in thread "main" java.lang.IncompatibleClassChangeError: Class com.google.common.base.Suppliers$NonSerializableMemoizingSupplier does not implement the requested interface java.util.function.Supplier
```

PiperOrigin-RevId: 563446857
  • Loading branch information
cushon authored and google-java-format Team committed Sep 7, 2023
1 parent 915b78f commit d0e44e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/googlejavaformat/Doc.java
Expand Up @@ -19,6 +19,7 @@
import static java.lang.Math.max;

import com.google.common.base.MoreObjects;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.DiscreteDomain;
import com.google.common.collect.Iterators;
Expand All @@ -27,7 +28,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.function.Supplier;

/**
* {@link com.google.googlejavaformat.java.JavaInputAstVisitor JavaInputAstVisitor} outputs a
Expand Down

0 comments on commit d0e44e5

Please sign in to comment.