Polish
See gh-12236
This commit is contained in:
committed by
Stephane Nicoll
parent
a93052f380
commit
56cbc65e7b
@@ -56,10 +56,9 @@ public class BackgroundPreinitializer
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(SpringApplicationEvent event) {
|
||||
if (event instanceof ApplicationStartingEvent) {
|
||||
if (preinitializationStarted.compareAndSet(false, true)) {
|
||||
performPreinitialization();
|
||||
}
|
||||
if (event instanceof ApplicationStartingEvent
|
||||
&& preinitializationStarted.compareAndSet(false, true)) {
|
||||
performPreinitialization();
|
||||
}
|
||||
if ((event instanceof ApplicationReadyEvent
|
||||
|| event instanceof ApplicationFailedEvent)
|
||||
|
||||
@@ -218,13 +218,12 @@ public class EmbeddedLdapAutoConfiguration {
|
||||
AnnotatedTypeMetadata metadata) {
|
||||
Builder message = ConditionMessage.forCondition("Embedded LDAP");
|
||||
Environment environment = context.getEnvironment();
|
||||
if (environment != null) {
|
||||
if (!Binder.get(environment)
|
||||
if (environment != null
|
||||
&& !Binder.get(environment)
|
||||
.bind("spring.ldap.embedded.base-dn", STRING_LIST)
|
||||
.orElseGet(Collections::emptyList).isEmpty()) {
|
||||
return ConditionOutcome
|
||||
.match(message.because("Found base-dn property"));
|
||||
}
|
||||
return ConditionOutcome
|
||||
.match(message.because("Found base-dn property"));
|
||||
}
|
||||
return ConditionOutcome.noMatch(message.because("No base-dn property found"));
|
||||
}
|
||||
|
||||
@@ -74,11 +74,10 @@ public class ConditionEvaluationReportLoggingListener
|
||||
logAutoConfigurationReport();
|
||||
}
|
||||
}
|
||||
else if (event instanceof ApplicationFailedEvent) {
|
||||
if (((ApplicationFailedEvent) event)
|
||||
else if (event instanceof ApplicationFailedEvent
|
||||
&& ((ApplicationFailedEvent) event)
|
||||
.getApplicationContext() == initializerApplicationContext) {
|
||||
logAutoConfigurationReport(true);
|
||||
}
|
||||
logAutoConfigurationReport(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -248,14 +248,13 @@ public class SessionAutoConfiguration {
|
||||
public void checkSessionRepository() {
|
||||
StoreType storeType = this.sessionProperties.getStoreType();
|
||||
if (storeType != StoreType.NONE
|
||||
&& this.sessionRepositoryProvider.getIfAvailable() == null) {
|
||||
if (storeType != null) {
|
||||
throw new SessionRepositoryUnavailableException(
|
||||
"No session repository could be auto-configured, check your "
|
||||
+ "configuration (session store type is '"
|
||||
+ storeType.name().toLowerCase(Locale.ENGLISH) + "')",
|
||||
storeType);
|
||||
}
|
||||
&& this.sessionRepositoryProvider.getIfAvailable() == null
|
||||
&& storeType != null) {
|
||||
throw new SessionRepositoryUnavailableException(
|
||||
"No session repository could be auto-configured, check your "
|
||||
+ "configuration (session store type is '"
|
||||
+ storeType.name().toLowerCase(Locale.ENGLISH) + "')",
|
||||
storeType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user