Skip to content

Commit

Permalink
Fixes compile issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkrog committed Oct 20, 2023
1 parent 5fe440f commit c01321a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,13 @@ public static ApiVersion getDefaultVersion() {
public static ApiVersion from(String version) {
try {
ApiVersion apiVersion;
if(version.equals("1.*") || version.startsWith("1.0")) {
apiVersion = from(Versions.V20200101);
} else if(version.startsWith("1.1")) {
apiVersion = from(Versions.V20200526);
} else if(version.startsWith("1.2")) {
apiVersion = from(Versions.V20200925);
} else {
LocalDate date = LocalDate.parse(version);
apiVersion = getFirstVersion();
for(ApiVersion current : VERSIONS) {
if(current.getVersionDate().isAfter(date)) {
break;
}
apiVersion = current;
LocalDate date = LocalDate.parse(version);
apiVersion = getFirstVersion();
for(ApiVersion current : VERSIONS) {
if(current.getVersionDate().isAfter(date)) {
break;
}
apiVersion = current;
}
return apiVersion;
} catch (Exception ex) {
Expand Down

0 comments on commit c01321a

Please sign in to comment.