Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Do not set native image system property in NativeListener #1625

Closed
sdeleuze opened this issue Jun 2, 2022 · 0 comments
Closed

Do not set native image system property in NativeListener #1625

sdeleuze opened this issue Jun 2, 2022 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Jun 2, 2022

After an initial report by @odrotbohm where the hacking/aot branch of https://github.com/odrotbohm/spring-restbucks demonstrated that just adding the spring-native dependency was breaking Mockito tests, we found the root cause was NativeListener setting the org.graalvm.nativeimage.imagecode system property combined with recent versions of Mockito/ByteBuddy now supporting GraalVM native image and reacting to this property.

It was done initially to increase consistency between JVM AOT and native, but it is probably better to avoid this kind of trick, and just remove any specific behavior based on org.graalvm.nativeimage.imagecode in Spring Framework 6+.

@sdeleuze sdeleuze added the type: bug A general bug label Jun 2, 2022
@sdeleuze sdeleuze added this to the 0.12.1 milestone Jun 2, 2022
@sdeleuze sdeleuze self-assigned this Jun 2, 2022
sdeleuze added a commit that referenced this issue Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A general bug
Development

No branches or pull requests

1 participant