Use older API

This commit is contained in:
Dave Syer
2023-01-16 11:31:12 +00:00
parent f47746afbf
commit 966c1f8a76
2 changed files with 6 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ jobs:
- |
rm -rf ~/.m2
ln -s $(pwd)/.m2 ~/.m2
./mvnw install -Dspring.version=6.0.1
./mvnw install -Dspring.version=6.0.3
- name: deploy
plan:
- get: source

View File

@@ -224,8 +224,11 @@ public class SpringInjector implements Injector {
static {
String version = SpringVersion.getVersion();
if (version != null && version.contains(".") && Integer.parseInt(version, 0, version.indexOf("."), 10) > 5) {
JAKARTA = true;
if (version != null && version.contains(".")) {
version = version.substring(0, version.indexOf("."));
if (Integer.parseInt(version) > 5) {
JAKARTA = true;
}
}
}