Skip to content
Prev Previous commit
Next Next commit
adding braces
  • Loading branch information
IvanMenov committed Nov 18, 2021
commit 64522f30fa7c98246cf01b5be9a876fa7c9a257b
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ public int compareVersion(String version1, String version2) {
String v1 = "";
String v2 = "";

if (i != version1.length()) v1 = version1.substring(i + 1);
if (i != version1.length()) {
v1 = version1.substring(i + 1);
}

if (j != version2.length()) v2 = version2.substring(j + 1);
if (j != version2.length()) {
v2 = version2.substring(j + 1);
}

// if both versions end here, they are equal
if (v1.equals("") && v2.equals("")) {
Expand Down