diff --git a/CHANGES.md b/CHANGES.md index e76bcf5b54..87d919a7d6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ This document is intended for Spotless developers. We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Fixed +- Fix the ability to specify a wildcard version (`*`) for external formatter executables, which did not work. ([#2848](https://github.com/diffplug/spotless/pull/2848)) ## [4.3.0] - 2026-01-27 ### Added diff --git a/lib/src/main/java/com/diffplug/spotless/ForeignExe.java b/lib/src/main/java/com/diffplug/spotless/ForeignExe.java index 861b66e8de..7a693dec9f 100644 --- a/lib/src/main/java/com/diffplug/spotless/ForeignExe.java +++ b/lib/src/main/java/com/diffplug/spotless/ForeignExe.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2025 DiffPlug + * Copyright 2020-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,7 +112,7 @@ public String confirmVersionAndGetAbsolutePath() throws IOException, Interrupted throw cantFind("Unable to parse version with /" + versionRegex + "/", cmdVersion); } String versionFound = versionMatcher.group(1); - if (!VERSION_WILDCARD.equals(versionFound) && !versionFound.equals(version)) { + if (!VERSION_WILDCARD.equals(version) && !versionFound.equals(version)) { throw wrongVersion("You specified version " + version + ", but Spotless found " + versionFound, cmdVersion, versionFound); } return exeAbsPath; diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index f5269d3bf2..b73e607579 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`). ## [Unreleased] +### Fixed +- Fix the ability to specify a wildcard version (`*`) for external formatter executables, which did not work. ([#2848](https://github.com/diffplug/spotless/pull/2848)) ## [8.2.1] - 2026-01-27 ### Fixed diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index 48e745cc03..adc8341618 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -3,6 +3,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Fixed +- Fix the ability to specify a wildcard version (`*`) for external formatter executables, which did not work. ([#2848](https://github.com/diffplug/spotless/pull/2848)) ## [3.2.1] - 2026-01-27 ### Fixed