Merge branch '3.4.x'
Closes gh-44406
This commit is contained in:
@@ -20,7 +20,6 @@ import java.time.Duration;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.amqp.core.AcknowledgeMode;
|
||||
import org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.AddressShuffleMode;
|
||||
@@ -194,7 +193,7 @@ public class RabbitProperties {
|
||||
if (port != null) {
|
||||
return port;
|
||||
}
|
||||
return (Optional.ofNullable(getSsl().getEnabled()).orElse(false)) ? DEFAULT_PORT_SECURE : DEFAULT_PORT;
|
||||
return Boolean.TRUE.equals(getSsl().getEnabled()) ? DEFAULT_PORT_SECURE : DEFAULT_PORT;
|
||||
}
|
||||
return this.parsedAddresses.get(0).port;
|
||||
}
|
||||
@@ -235,7 +234,7 @@ public class RabbitProperties {
|
||||
private List<Address> parseAddresses(List<String> addresses) {
|
||||
List<Address> parsedAddresses = new ArrayList<>();
|
||||
for (String address : addresses) {
|
||||
parsedAddresses.add(new Address(address, Optional.ofNullable(getSsl().getEnabled()).orElse(false)));
|
||||
parsedAddresses.add(new Address(address, Boolean.TRUE.equals(getSsl().getEnabled())));
|
||||
}
|
||||
return parsedAddresses;
|
||||
}
|
||||
@@ -475,7 +474,7 @@ public class RabbitProperties {
|
||||
* @see #getEnabled() ()
|
||||
*/
|
||||
public boolean determineEnabled() {
|
||||
boolean defaultEnabled = Optional.ofNullable(getEnabled()).orElse(false) || this.bundle != null;
|
||||
boolean defaultEnabled = Boolean.TRUE.equals(getEnabled()) || this.bundle != null;
|
||||
if (CollectionUtils.isEmpty(RabbitProperties.this.parsedAddresses)) {
|
||||
return defaultEnabled;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.boot.logging.structured;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.aot.generate.GenerationContext;
|
||||
@@ -58,10 +57,8 @@ class StructuredLoggingJsonPropertiesBeanFactoryInitializationAotProcessor
|
||||
}
|
||||
|
||||
private static String getCustomStackTracePrinter(StructuredLoggingJsonProperties properties) {
|
||||
return Optional.ofNullable(properties.stackTrace())
|
||||
.filter(StackTrace::hasCustomPrinter)
|
||||
.map(StackTrace::printer)
|
||||
.orElse(null);
|
||||
StackTrace stackTrace = properties.stackTrace();
|
||||
return (stackTrace != null && stackTrace.hasCustomPrinter()) ? stackTrace.printer() : null;
|
||||
}
|
||||
|
||||
private static final class AotContribution implements BeanFactoryInitializationAotContribution {
|
||||
|
||||
Reference in New Issue
Block a user