Browse Source

Refine "checkpoint on refresh" error handling

Closes gh-31096
pull/31113/head
Sébastien Deleuze 2 years ago
parent
commit
c6c61d6485
  1. 3
      spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java

3
spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java

@ -108,6 +108,9 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor @@ -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");
}
}

Loading…
Cancel
Save