Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1t3p1g committed Apr 9, 2024
1 parent 16ed8c9 commit b3fa31f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/tabby/common/utils/JavaVersionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public static JavaVersionUtils getLocalVersion() {
return null;
}
JavaVersionUtils v = new JavaVersionUtils();
String parts[] = property.split("\\.|_|-");
String[] parts = property.split("\\.|_|-");
int start = "1".equals(parts[0]) ? 1 : 0; // skip "1." prefix
v.major = Integer.parseInt(parts[start + 0]);
v.minor = Integer.parseInt(parts[start + 1]);
v.update = Integer.parseInt(parts[start + 2]);
v.major = Integer.parseInt(parts[start]);
// v.minor = Integer.parseInt(parts[start + 1]);
// v.update = Integer.parseInt(parts[start + 2]);
return v;
}

Expand Down

0 comments on commit b3fa31f

Please sign in to comment.