Skip to content

Commit 1a19b3f

Browse files
authored
FormatterFunc no longer extends Function or BiFunction. (#638)
1 parent 86c6f96 commit 1a19b3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
2121
* **BREAKING** `FileSignature` can no longer sign folders, only files. Signatures are now based only on filename (not path), size, and a content hash. It throws an error if a signature is attempted on a folder or on multiple files with different paths but the same filename - it never breaks silently. This change does not break any of Spotless' internal logic, so it is unlikely to affect any of Spotless' consumers either. ([#571](https://github.com/diffplug/spotless/pull/571))
2222
* This change allows the maven plugin to cache classloaders across subprojects when loading config resources from the classpath (fixes [#559](https://github.com/diffplug/spotless/issues/559)).
2323
* This change also allows the gradle plugin to work with the remote buildcache (fixes [#280](https://github.com/diffplug/spotless/issues/280)).
24+
* **BREAKING** `FormatterFunc` no longer `extends ThrowingEx.Function` and `BiFunction`. In a major win for Java's idea of ["target typing"](https://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-final.html), this required no changes anywhere in the codebase except deleting the `extends` part of `FormatterFunc` ([#638](https://github.com/diffplug/spotless/issues/638)).
2425
* **BREAKING** Heavy refactor of the `LicenseHeaderStep` public API. Doesn't change internal behavior, but makes implementation of the gradle and maven plugins much easier. ([#628](https://github.com/diffplug/spotless/pull/628))
2526
* **BREAKING** Removed all deprecated methods and classes from `lib` and `lib-extra`.
2627
* [#629](https://github.com/diffplug/spotless/pull/629) removes the code which wasn't being used in plugin-gradle or plugin-maven.

lib/src/main/java/com/diffplug/spotless/FormatterFunc.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
* to formatters. If you need the File, see {@link NeedsFile}.
2525
*/
2626
@FunctionalInterface
27-
public interface FormatterFunc
28-
extends ThrowingEx.Function<String, String>, ThrowingEx.BiFunction<String, File, String> {
27+
public interface FormatterFunc {
2928

3029
String apply(String input) throws Exception;
3130

0 commit comments

Comments
 (0)