Use Java 24 to build Spring Framework
This commit also adapts tests for a Java 24 runtime. Closes gh-34639
This commit is contained in:
parent
274a689a10
commit
b8b279d3e0
|
@ -44,7 +44,7 @@ public class JavaConventions {
|
||||||
/**
|
/**
|
||||||
* The Java version we should use as the JVM baseline for building the project
|
* The Java version we should use as the JVM baseline for building the project
|
||||||
*/
|
*/
|
||||||
private static final JavaLanguageVersion DEFAULT_LANGUAGE_VERSION = JavaLanguageVersion.of(23);
|
private static final JavaLanguageVersion DEFAULT_LANGUAGE_VERSION = JavaLanguageVersion.of(24);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Java version we should use as the baseline for the compiled bytecode (the "-release" compiler argument)
|
* The Java version we should use as the baseline for the compiled bytecode (the "-release" compiler argument)
|
||||||
|
|
|
@ -95,9 +95,10 @@ class AspectJEnableCachingIsolatedTests {
|
||||||
}
|
}
|
||||||
catch (NoUniqueBeanDefinitionException ex) {
|
catch (NoUniqueBeanDefinitionException ex) {
|
||||||
assertThat(ex.getMessage()).contains(
|
assertThat(ex.getMessage()).contains(
|
||||||
"no CacheResolver specified and expected single matching CacheManager but found 2: cm1,cm2");
|
"no CacheResolver specified and expected single matching CacheManager but found 2")
|
||||||
|
.contains("cm1", "cm2");
|
||||||
assertThat(ex.getNumberOfBeansFound()).isEqualTo(2);
|
assertThat(ex.getNumberOfBeansFound()).isEqualTo(2);
|
||||||
assertThat(ex.getBeanNamesFound()).containsExactly("cm1", "cm2");
|
assertThat(ex.getBeanNamesFound()).containsExactlyInAnyOrder("cm1", "cm2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,9 +94,10 @@ class EnableCachingTests extends AbstractCacheAnnotationTests {
|
||||||
assertThatThrownBy(ctx::refresh)
|
assertThatThrownBy(ctx::refresh)
|
||||||
.isInstanceOfSatisfying(NoUniqueBeanDefinitionException.class, ex -> {
|
.isInstanceOfSatisfying(NoUniqueBeanDefinitionException.class, ex -> {
|
||||||
assertThat(ex.getMessage()).contains(
|
assertThat(ex.getMessage()).contains(
|
||||||
"no CacheResolver specified and expected single matching CacheManager but found 2: cm1,cm2");
|
"no CacheResolver specified and expected single matching CacheManager but found 2")
|
||||||
|
.contains("cm1", "cm2");
|
||||||
assertThat(ex.getNumberOfBeansFound()).isEqualTo(2);
|
assertThat(ex.getNumberOfBeansFound()).isEqualTo(2);
|
||||||
assertThat(ex.getBeanNamesFound()).containsExactly("cm1", "cm2");
|
assertThat(ex.getBeanNamesFound()).containsExactlyInAnyOrder("cm1", "cm2");
|
||||||
}).hasNoCause();
|
}).hasNoCause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ class ConfigurationClassProcessingTests {
|
||||||
BeanFactory factory = initBeanFactory(true, ConfigWithMethodNameMismatch.class);
|
BeanFactory factory = initBeanFactory(true, ConfigWithMethodNameMismatch.class);
|
||||||
|
|
||||||
SpousyTestBean foo = factory.getBean("foo", SpousyTestBean.class);
|
SpousyTestBean foo = factory.getBean("foo", SpousyTestBean.class);
|
||||||
assertThat(foo.getName()).isEqualTo("foo1");
|
assertThat(foo.getName()).isIn("foo1", "foo2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue