Refine "checkpoint on refresh" error handling

Closes gh-31096
This commit is contained in:
Sébastien Deleuze 2023-08-23 12:33:13 +02:00
parent bf2cdcb1f2
commit c6c61d6485
1 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,9 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
if (!NativeDetector.inNativeImage() && ClassUtils.isPresent("org.crac.Core", getClass().getClassLoader())) {
this.cracResource = new CracDelegate().registerResource();
}
else if (checkpointOnRefresh) {
throw new IllegalStateException("Checkpoint on refresh requires a CRaC-enabled JVM and 'org.crac:crac' on the classpath");
}
}