-
Notifications
You must be signed in to change notification settings - Fork 41k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency of ApplicationContextRunner in some cases with jdk17 #28528
Labels
status: superseded
An issue that has been superseded by another
Comments
@jorgerod can you please move all of that in a sample that we can actually run rather than code snippet? |
Added to initial comment |
@snicoll I think I can reproduce this. If you don't mind, I'd give this a shot. |
It's all yours Christoph. Thanks! |
dreis2211
added a commit
to dreis2211/spring-boot
that referenced
this issue
Nov 3, 2021
dreis2211
added a commit
to dreis2211/spring-boot
that referenced
this issue
Nov 3, 2021
dreis2211
added a commit
to dreis2211/spring-boot
that referenced
this issue
Nov 3, 2021
dreis2211
added a commit
to dreis2211/spring-boot
that referenced
this issue
Nov 3, 2021
Closing in favor of PR #28531 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Inconsistency with tests using ApplicationContextRunner under certain conditions with jdk17 (OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)).
Version SB: 2.5.6
I have the following autoconfiguration:
That loads a bean
MyBean
and this bean in a lazy way, injects a configurationproperties.I have the following tests with ApplicationContextRunner to test the autoconfiguration (as you can see, the two tests are identical):
When these tests are run individually it works fine but if they are launched sequentially, the second one always fails by launching the following trace:
Expand stacktrace
Note that if I remove
.withClassLoader(new FilteredClassLoader(SomeClass.class))
it works correctly.Also, if I inject the bean without
@Lazy
, it works correctly.This behavior occurs with jdk17 but not with jdk11.
The text was updated successfully, but these errors were encountered: