Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
cd76da9a
Commit
cd76da9a
authored
Mar 16, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using immutable collections for configuration proprerties
Closes gh-8620
parent
ed2164b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
17 deletions
+21
-17
JestProperties.java
...boot/autoconfigure/elasticsearch/jest/JestProperties.java
+5
-3
FlywayProperties.java
...framework/boot/autoconfigure/flyway/FlywayProperties.java
+4
-4
SecurityProperties.java
...ework/boot/autoconfigure/security/SecurityProperties.java
+4
-3
NarayanaProperties.java
...springframework/boot/jta/narayana/NarayanaProperties.java
+8
-7
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestProperties.java
View file @
cd76da9a
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -16,7 +16,8 @@
...
@@ -16,7 +16,8 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
elasticsearch
.
jest
;
package
org
.
springframework
.
boot
.
autoconfigure
.
elasticsearch
.
jest
;
import
java.util.Arrays
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
...
@@ -33,7 +34,8 @@ public class JestProperties {
...
@@ -33,7 +34,8 @@ public class JestProperties {
/**
/**
* Comma-separated list of the Elasticsearch instances to use.
* Comma-separated list of the Elasticsearch instances to use.
*/
*/
private
List
<
String
>
uris
=
Arrays
.
asList
(
"http://localhost:9200"
);
private
List
<
String
>
uris
=
new
ArrayList
<
String
>(
Collections
.
singletonList
(
"http://localhost:9200"
));
/**
/**
* Login user.
* Login user.
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java
View file @
cd76da9a
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
flyway
;
package
org
.
springframework
.
boot
.
autoconfigure
.
flyway
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -40,7 +39,8 @@ public class FlywayProperties {
...
@@ -40,7 +39,8 @@ public class FlywayProperties {
/**
/**
* Locations of migrations scripts.
* Locations of migrations scripts.
*/
*/
private
List
<
String
>
locations
=
new
ArrayList
<
String
>(
Arrays
.
asList
(
"db/migration"
));
private
List
<
String
>
locations
=
new
ArrayList
<
String
>(
Collections
.
singletonList
(
"db/migration"
));
/**
/**
* Check that migration scripts location exists.
* Check that migration scripts location exists.
...
@@ -72,7 +72,7 @@ public class FlywayProperties {
...
@@ -72,7 +72,7 @@ public class FlywayProperties {
* SQL statements to execute to initialize a connection immediately after obtaining
* SQL statements to execute to initialize a connection immediately after obtaining
* it.
* it.
*/
*/
private
List
<
String
>
initSqls
=
Collections
.
emptyList
();
private
List
<
String
>
initSqls
=
new
ArrayList
<
String
>
();
public
void
setLocations
(
List
<
String
>
locations
)
{
public
void
setLocations
(
List
<
String
>
locations
)
{
this
.
locations
=
locations
;
this
.
locations
=
locations
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityProperties.java
View file @
cd76da9a
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
security
;
package
org
.
springframework
.
boot
.
autoconfigure
.
security
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.
Array
s
;
import
java.util.
Collection
s
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.UUID
;
import
java.util.UUID
;
...
@@ -314,7 +314,8 @@ public class SecurityProperties implements SecurityPrerequisite {
...
@@ -314,7 +314,8 @@ public class SecurityProperties implements SecurityPrerequisite {
/**
/**
* Granted roles for the default user name.
* Granted roles for the default user name.
*/
*/
private
List
<
String
>
role
=
new
ArrayList
<
String
>(
Arrays
.
asList
(
"USER"
));
private
List
<
String
>
role
=
new
ArrayList
<
String
>(
Collections
.
singletonList
(
"USER"
));
private
boolean
defaultPassword
=
true
;
private
boolean
defaultPassword
=
true
;
...
...
spring-boot/src/main/java/org/springframework/boot/jta/narayana/NarayanaProperties.java
View file @
cd76da9a
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org
.
springframework
.
boot
.
jta
.
narayana
;
package
org
.
springframework
.
boot
.
jta
.
narayana
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -90,22 +91,22 @@ public class NarayanaProperties {
...
@@ -90,22 +91,22 @@ public class NarayanaProperties {
/**
/**
* Comma-separated list of orphan filters.
* Comma-separated list of orphan filters.
*/
*/
private
List
<
String
>
xaResourceOrphanFilters
=
Arrays
.
asList
(
private
List
<
String
>
xaResourceOrphanFilters
=
new
ArrayList
<
String
>(
Arrays
.
asList
(
"com.arjuna.ats.internal.jta.recovery.arjunacore.JTATransactionLogXAResourceOrphanFilter"
,
"com.arjuna.ats.internal.jta.recovery.arjunacore.JTATransactionLogXAResourceOrphanFilter"
,
"com.arjuna.ats.internal.jta.recovery.arjunacore.JTANodeNameXAResourceOrphanFilter"
);
"com.arjuna.ats.internal.jta.recovery.arjunacore.JTANodeNameXAResourceOrphanFilter"
)
)
;
/**
/**
* Comma-separated list of recovery modules.
* Comma-separated list of recovery modules.
*/
*/
private
List
<
String
>
recoveryModules
=
Arrays
.
asList
(
private
List
<
String
>
recoveryModules
=
new
ArrayList
<
String
>(
Arrays
.
asList
(
"com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"
,
"com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"
,
"com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
);
"com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
)
)
;
/**
/**
* Comma-separated list of expiry scanners.
* Comma-separated list of expiry scanners.
*/
*/
private
List
<
String
>
expiryScanners
=
Collections
.
singletonList
(
private
List
<
String
>
expiryScanners
=
new
ArrayList
<
String
>(
Collections
.
singletonList
(
"com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner"
);
"com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner"
)
)
;
public
String
getLogDir
()
{
public
String
getLogDir
()
{
return
this
.
logDir
;
return
this
.
logDir
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment