feat:add zero protection.

pull/1278/head
Haotian Zhang 1 year ago
parent 7d5b931ba8
commit 5b7acf92b6

@ -139,8 +139,19 @@ public class PolarisConfigDataLocationResolver implements
} }
// prepare and init earlier Polaris SDKContext to pull config files from remote. // prepare and init earlier Polaris SDKContext to pull config files from remote.
prepareAndInitEarlierPolarisSdkContext(resolverContext, polarisConfigProperties, polarisCryptoConfigProperties, polarisContextProperties); try {
prepareAndInitEarlierPolarisSdkContext(resolverContext, polarisConfigProperties, polarisCryptoConfigProperties, polarisContextProperties);
}
catch (Throwable throwable) {
if (location.isOptional()) {
log.warn("create earlier polaris SDK context failed.", throwable);
return new ArrayList<>();
}
else {
log.error("create earlier polaris SDK context failed.", throwable);
throw throwable;
}
}
bootstrapContext.registerIfAbsent(PolarisConfigProperties.class, bootstrapContext.registerIfAbsent(PolarisConfigProperties.class,
BootstrapRegistry.InstanceSupplier.of(polarisConfigProperties)); BootstrapRegistry.InstanceSupplier.of(polarisConfigProperties));

Loading…
Cancel
Save