Skip to content

Commit cf8ac88

Browse files
committed
Remove unnecessary field initialization in @ConfigurationProperties class
Signed-off-by: Yanming Zhou <[email protected]>
1 parent 91da8c5 commit cf8ac88

File tree

35 files changed

+81
-81
lines changed

35 files changed

+81
-81
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthIndicatorProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class DataSourceHealthIndicatorProperties {
3232
* Whether to ignore AbstractRoutingDataSources when creating database health
3333
* indicators.
3434
*/
35-
private boolean ignoreRoutingDataSources = false;
35+
private boolean ignoreRoutingDataSources;
3636

3737
public boolean isIgnoreRoutingDataSources() {
3838
return this.ignoreRoutingDataSources;

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public class ElasticProperties extends StepRegistryProperties {
8383
* Whether to enable _source in the default index template when auto-creating the
8484
* index.
8585
*/
86-
private boolean enableSource = false;
86+
private boolean enableSource;
8787

8888
public String getHost() {
8989
return this.host;

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class StackdriverProperties extends StepRegistryProperties {
5252
* published as the GAUGE MetricKind. When true, counter metrics are published as the
5353
* CUMULATIVE MetricKind.
5454
*/
55-
private boolean useSemanticMetricTypes = false;
55+
private boolean useSemanticMetricTypes;
5656

5757
/**
5858
* Prefix for metric type. Valid prefixes are described in the Google Cloud

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public static class Brave {
281281
* between client and server spans. Requires B3 propagation and a compatible
282282
* backend.
283283
*/
284-
private boolean spanJoiningSupported = false;
284+
private boolean spanJoiningSupported;
285285

286286
public boolean isSpanJoiningSupported() {
287287
return this.spanJoiningSupported;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ public static class DirectContainer extends AmqpContainer {
937937
* Whether to fail if the queues declared by the container are not available on
938938
* the broker.
939939
*/
940-
private boolean missingQueuesFatal = false;
940+
private boolean missingQueuesFatal;
941941

942942
public Integer getConsumersPerQueue() {
943943
return this.consumersPerQueue;

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ public class MessageSourceProperties {
7474
* Whether to always apply the MessageFormat rules, parsing even messages without
7575
* arguments.
7676
*/
77-
private boolean alwaysUseMessageFormat = false;
77+
private boolean alwaysUseMessageFormat;
7878

7979
/**
8080
* Whether to use the message code as the default message instead of throwing a
8181
* "NoSuchMessageException". Recommended during development only.
8282
*/
83-
private boolean useCodeAsDefaultMessage = false;
83+
private boolean useCodeAsDefaultMessage;
8484

8585
public List<String> getBasename() {
8686
return this.basename;

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static class Pageable {
6060
* Whether to expose and assume 1-based page number indexes. Defaults to "false",
6161
* meaning a page number of 0 in the request equals the first page.
6262
*/
63-
private boolean oneIndexedParameters = false;
63+
private boolean oneIndexedParameters;
6464

6565
/**
6666
* General prefix to be prepended to the page number and page size parameters.

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class ElasticsearchProperties {
6060
/**
6161
* Whether to enable socket keep alive between client and Elasticsearch.
6262
*/
63-
private boolean socketKeepAlive = false;
63+
private boolean socketKeepAlive;
6464

6565
/**
6666
* Prefix added to the path of every request sent to Elasticsearch.

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public class FlywayProperties {
247247
* Whether to validate migrations and callbacks whose scripts do not obey the correct
248248
* naming convention.
249249
*/
250-
private boolean validateMigrationNaming = false;
250+
private boolean validateMigrationNaming;
251251

252252
/**
253253
* Whether to automatically call validate when performing a migration.

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public static class Printer {
180180
* Whether the endpoint that prints the schema is enabled. Schema is available
181181
* under spring.graphql.path + "/schema".
182182
*/
183-
private boolean enabled = false;
183+
private boolean enabled;
184184

185185
public boolean isEnabled() {
186186
return this.enabled;
@@ -204,7 +204,7 @@ public static class Graphiql {
204204
/**
205205
* Whether the default GraphiQL UI is enabled.
206206
*/
207-
private boolean enabled = false;
207+
private boolean enabled;
208208

209209
public String getPath() {
210210
return this.path;

0 commit comments

Comments
 (0)