From 5166b3dc9e33be780227629c81fcd657d86155ff Mon Sep 17 00:00:00 2001 From: Suganya Date: Mon, 15 Feb 2021 19:22:23 +0530 Subject: [PATCH] Fix display text when marking version --- src/main/java/org/ballerinalang/command/util/ToolUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ballerinalang/command/util/ToolUtil.java b/src/main/java/org/ballerinalang/command/util/ToolUtil.java index 6f6fc2fe..b96d979d 100644 --- a/src/main/java/org/ballerinalang/command/util/ToolUtil.java +++ b/src/main/java/org/ballerinalang/command/util/ToolUtil.java @@ -833,13 +833,13 @@ public static String getType(String version) { * @param version distribution version */ public static String getTypeName(String version) { + char lastChar = version.charAt(version.length() - 1); if (version.contains("1.")) { return "jballerina" + " version " + version; } else if(version.contains("slp")) { - char lastChar = version.charAt(version.length() - 1); return " Preview " + lastChar; } else { - String versionId = version.substring(2); + String versionId = version.substring(2, version.length() - 1) + " " + lastChar; return versionId.substring(0, 1).toUpperCase() + versionId.substring(1); } }