Skip to content

Commit f8ae1ff

Browse files
committed
Merge pull request #43934 from quaff
* pr/43934: Polish 'Use isXxx() instead of getXxx() for boolean properties' Use isXxx() instead of getXxx() for boolean properties Closes gh-43934
2 parents 311e440 + 5850306 commit f8ae1ff

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitConnectionFactoryBeanConfigurer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public void configure(RabbitConnectionFactoryBean factory) {
151151
}
152152
map.from(ssl::isValidateServerCertificate)
153153
.to((validate) -> factory.setSkipServerCertificateValidation(!validate));
154-
map.from(ssl::getVerifyHostname).to(factory::setEnableHostnameVerification);
154+
map.from(ssl::isVerifyHostname).to(factory::setEnableHostnameVerification);
155155
}
156156
map.from(this.rabbitProperties::getConnectionTimeout)
157157
.whenNonNull()

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -575,7 +575,7 @@ public void setValidateServerCertificate(boolean validateServerCertificate) {
575575
this.validateServerCertificate = validateServerCertificate;
576576
}
577577

578-
public boolean getVerifyHostname() {
578+
public boolean isVerifyHostname() {
579579
return this.verifyHostname;
580580
}
581581

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/h2/H2ConsoleProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void setPath(String path) {
5353
this.path = path;
5454
}
5555

56-
public boolean getEnabled() {
56+
public boolean isEnabled() {
5757
return this.enabled;
5858
}
5959

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public class HateoasProperties {
3434
*/
3535
private boolean useHalAsDefaultJsonMediaType = true;
3636

37-
public boolean getUseHalAsDefaultJsonMediaType() {
37+
public boolean isUseHalAsDefaultJsonMediaType() {
3838
return this.useHalAsDefaultJsonMediaType;
3939
}
4040

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ public class JmxProperties {
5353
*/
5454
private RegistrationPolicy registrationPolicy = RegistrationPolicy.FAIL_ON_EXISTING;
5555

56-
public boolean getEnabled() {
56+
public boolean isEnabled() {
5757
return this.enabled;
5858
}
5959

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/MultipartProperties.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -86,7 +86,7 @@ public class MultipartProperties {
8686
*/
8787
private boolean strictServletCompliance = false;
8888

89-
public boolean getEnabled() {
89+
public boolean isEnabled() {
9090
return this.enabled;
9191
}
9292

0 commit comments

Comments
 (0)