Skip to content

Commit 0be2844

Browse files
Upgrade Message: Print current version
1 parent 23249fc commit 0be2844

File tree

1 file changed

+3
-2
lines changed
  • lib/src/main/java/com/diffplug/spotless

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ private String buildUpgradeFormatterMessage(V fmtVersion) {
198198
StringBuilder builder = new StringBuilder();
199199
V recommendedFmtVersionOrNull = getRecommendedFormatterVersion();
200200
if (null != recommendedFmtVersionOrNull && (fmtVersionComparator.compare(fmtVersion, recommendedFmtVersionOrNull) < 0)) {
201-
builder.append(String.format("You are not using latest version on JVM %d+.%n", getRequiredJvmVersion(recommendedFmtVersionOrNull)));
202-
builder.append(String.format("Try to upgrade to %s %s, which may have fixed this problem.", fmtName, getRecommendedFormatterVersion()));
201+
builder.append(String.format("%s %s is currently being used, but outdated.%n", fmtName, fmtVersion));
202+
builder.append(String.format("%s %s is the recommended version, which may have fixed this problem.%n", fmtName, recommendedFmtVersionOrNull));
203+
builder.append(String.format("%s %s requires JVM %d+.", fmtName, recommendedFmtVersionOrNull, getRequiredJvmVersion(recommendedFmtVersionOrNull)));
203204
} else {
204205
V higherFormatterVersionOrNull = fmt2jvmVersion.higherKey(fmtVersion);
205206
if (null != higherFormatterVersionOrNull) {

0 commit comments

Comments
 (0)