Cleanup version determination in CustomRuntimeEventLoop

This commit is contained in:
Oleg Zhurakousky
2022-01-17 18:06:52 +01:00
parent 061729673b
commit bfe4b93179
2 changed files with 8 additions and 2 deletions

View File

@@ -236,6 +236,12 @@ public final class CustomRuntimeEventLoop implements SmartLifecycle {
return "UNKNOWN-VERSION";
}
int startIndex = path.lastIndexOf("/") + 1;
return path.substring(startIndex, endIndex).replace("spring-cloud-function-adapter-aws-", "");
try {
return path.substring(startIndex, endIndex).replace("spring-cloud-function-adapter-aws-", "");
}
catch (Throwable e) {
logger.info("Failed to deterimine framework version");
return "UNKNOWN-VERSION";
}
}
}

View File

@@ -38,7 +38,7 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-kotlin</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>