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
30262e3b
Commit
30262e3b
authored
Sep 05, 2017
by
Johnny Lim
Committed by
Stephane Nicoll
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
Closes gh-10168
parent
8b88c6e8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
25 deletions
+23
-25
StatsdMetricWriter.java
...ework/boot/actuate/metrics/statsd/StatsdMetricWriter.java
+2
-2
CompositeReactiveHealthIndicatorFactoryTests.java
.../health/CompositeReactiveHealthIndicatorFactoryTests.java
+4
-4
AutoConfigurations.java
...pringframework/boot/autoconfigure/AutoConfigurations.java
+1
-1
RepositoryConfiguration.java
...work/boot/cli/compiler/grape/RepositoryConfiguration.java
+2
-2
TestPropertyValues.java
...rg/springframework/boot/test/util/TestPropertyValues.java
+8
-8
TestPropertyValuesTests.java
...ringframework/boot/test/util/TestPropertyValuesTests.java
+0
-1
Configurations.java
...ringframework/boot/context/annotation/Configurations.java
+4
-4
AbstractWebEndpointServletHandlerMapping.java
...int/web/mvc/AbstractWebEndpointServletHandlerMapping.java
+1
-1
GenericReactiveWebApplicationContext.java
...eactive/context/GenericReactiveWebApplicationContext.java
+1
-1
ConfigurationsTests.java
...ramework/boot/context/annotation/ConfigurationsTests.java
+0
-1
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/statsd/StatsdMetricWriter.java
View file @
30262e3b
...
...
@@ -121,8 +121,8 @@ public class StatsdMetricWriter implements MetricWriter, Closeable {
/**
* Sanitize the metric name if necessary.
* @param name
T
he metric name
* @return
T
he sanitized metric name
* @param name
t
he metric name
* @return
t
he sanitized metric name
*/
private
String
sanitizeMetricName
(
String
name
)
{
return
name
.
replace
(
":"
,
"-"
);
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeReactiveHealthIndicatorFactoryTests.java
View file @
30262e3b
...
...
@@ -74,19 +74,19 @@ public class CompositeReactiveHealthIndicatorFactoryTests {
@Test
public
void
reactiveHealthIndicatorTakesPrecedence
()
{
ReactiveHealthIndicator
reactive
h
ealthIndicator
=
mock
(
ReactiveHealthIndicator
reactive
H
ealthIndicator
=
mock
(
ReactiveHealthIndicator
.
class
);
given
(
reactive
h
ealthIndicator
.
health
()).
willReturn
(
Mono
.
just
(
UP
));
given
(
reactive
H
ealthIndicator
.
health
()).
willReturn
(
Mono
.
just
(
UP
));
HealthIndicator
regularHealthIndicator
=
mock
(
HealthIndicator
.
class
);
given
(
regularHealthIndicator
.
health
()).
willReturn
(
UP
);
ReactiveHealthIndicator
healthIndicator
=
createHealthIndicator
(
Collections
.
singletonMap
(
"test"
,
reactive
h
ealthIndicator
),
Collections
.
singletonMap
(
"test"
,
reactive
H
ealthIndicator
),
Collections
.
singletonMap
(
"test"
,
regularHealthIndicator
));
StepVerifier
.
create
(
healthIndicator
.
health
()).
consumeNextWith
((
h
)
->
{
assertThat
(
h
.
getStatus
()).
isEqualTo
(
Status
.
UP
);
assertThat
(
h
.
getDetails
()).
containsOnlyKeys
(
"test"
);
}).
verifyComplete
();
verify
(
reactive
h
ealthIndicator
,
times
(
1
)).
health
();
verify
(
reactive
H
ealthIndicator
,
times
(
1
)).
health
();
verify
(
regularHealthIndicator
,
times
(
0
)).
health
();
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurations.java
View file @
30262e3b
...
...
@@ -36,7 +36,7 @@ import org.springframework.util.ClassUtils;
*/
public
class
AutoConfigurations
extends
Configurations
implements
Ordered
{
private
static
AutoConfigurationSorter
SORTER
=
new
AutoConfigurationSorter
(
private
static
final
AutoConfigurationSorter
SORTER
=
new
AutoConfigurationSorter
(
new
SimpleMetadataReaderFactory
(),
null
);
private
static
final
Ordered
ORDER
=
new
AutoConfigurationImportSelector
();
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/RepositoryConfiguration.java
View file @
30262e3b
...
...
@@ -35,8 +35,8 @@ public final class RepositoryConfiguration {
/**
* Creates a new {@code RepositoryConfiguration} instance.
* @param name
T
he name of the repository
* @param uri
T
he uri of the repository
* @param name
t
he name of the repository
* @param uri
t
he uri of the repository
* @param snapshotsEnabled {@code true} if the repository should enable access to
* snapshots, {@code false} otherwise
*/
...
...
spring-boot-test/src/main/java/org/springframework/boot/test/util/TestPropertyValues.java
View file @
30262e3b
...
...
@@ -60,7 +60,7 @@ public final class TestPropertyValues {
/**
* Builder method to add more properties.
* @param pairs
T
he property pairs to add
* @param pairs
t
he property pairs to add
* @return a new {@link TestPropertyValues} instance
*/
public
TestPropertyValues
and
(
String
...
pairs
)
{
...
...
@@ -119,7 +119,7 @@ public final class TestPropertyValues {
/**
* Add the properties to the {@link System#getProperties() system properties} for the
* duration of the {@code call}, restoring previous values
t
hen the call completes.
* duration of the {@code call}, restoring previous values
w
hen the call completes.
* @param <T> the result type
* @param call the call to make
* @return the result of the call
...
...
@@ -158,7 +158,7 @@ public final class TestPropertyValues {
* Return a new {@link TestPropertyValues} with the underlying map populated with the
* given property pairs. Name-value pairs can be specified with colon (":") or equals
* ("=") separators.
* @param pairs
The key
value pairs for properties that need to be added to the
* @param pairs
the name-
value pairs for properties that need to be added to the
* environment
* @return the new instance
*/
...
...
@@ -170,7 +170,7 @@ public final class TestPropertyValues {
* Return a new {@link TestPropertyValues} with the underlying map populated with the
* given property pairs. Name-value pairs can be specified with colon (":") or equals
* ("=") separators.
* @param pairs
The key
value pairs for properties that need to be added to the
* @param pairs
the name-
value pairs for properties that need to be added to the
* environment
* @return the new instance
*/
...
...
@@ -185,7 +185,7 @@ public final class TestPropertyValues {
* Return a new {@link TestPropertyValues} with the underlying map populated with the
* given property pairs. Name-value pairs can be specified with colon (":") or equals
* ("=") separators.
* @param pairs
The key
value pairs for properties that need to be added to the
* @param pairs
the name-
value pairs for properties that need to be added to the
* environment
* @return the new instance
*/
...
...
@@ -197,7 +197,7 @@ public final class TestPropertyValues {
}
/**
* Return a
new
empty {@link TestPropertyValues} instance.
* Return a
n
empty {@link TestPropertyValues} instance.
* @return an empty instance
*/
public
static
TestPropertyValues
empty
()
{
...
...
@@ -252,9 +252,9 @@ public final class TestPropertyValues {
public
static
Pair
parse
(
String
pair
)
{
int
index
=
getSeparatorIndex
(
pair
);
String
key
=
(
index
>
0
?
pair
.
substring
(
0
,
index
)
:
pair
);
String
name
=
(
index
>
0
?
pair
.
substring
(
0
,
index
)
:
pair
);
String
value
=
(
index
>
0
?
pair
.
substring
(
index
+
1
)
:
""
);
return
of
(
key
.
trim
(),
value
.
trim
());
return
of
(
name
.
trim
(),
value
.
trim
());
}
private
static
int
getSeparatorIndex
(
String
pair
)
{
...
...
spring-boot-test/src/test/java/org/springframework/boot/test/util/TestPropertyValuesTests.java
View file @
30262e3b
...
...
@@ -132,7 +132,6 @@ public class TestPropertyValuesTests {
return
null
;
});
assertThat
(
System
.
getProperty
(
"foo"
)).
isEqualTo
(
"bar1"
);
assertThat
(
System
.
getProperties
()).
doesNotContainKey
(
"baz"
);
}
finally
{
System
.
clearProperty
(
"foo"
);
...
...
spring-boot/src/main/java/org/springframework/boot/context/annotation/Configurations.java
View file @
30262e3b
...
...
@@ -36,9 +36,9 @@ import org.springframework.test.context.junit4.SpringRunner;
import
org.springframework.util.Assert
;
/**
* A set of {@link Configuration @Configuration} classes that can be registered
* A set of {@link Configuration @Configuration} classes that can be registered
in
* {@link ApplicationContext}. Classes can be returned from one or more
* {@link Configurations} instance by using {@link #getClasses(Configurations[])}. The
* {@link Configurations} instance
s
by using {@link #getClasses(Configurations[])}. The
* resulting array follows the ordering rules usually applied by the
* {@link ApplicationContext} and/or custom {@link ImportSelector} implementations.
* <p>
...
...
@@ -57,7 +57,7 @@ public abstract class Configurations {
private
static
final
Comparator
<
Object
>
COMPARATOR
=
OrderComparator
.
INSTANCE
.
thenComparing
((
other
)
->
other
.
getClass
().
getName
());
private
Set
<
Class
<?>>
classes
;
private
final
Set
<
Class
<?>>
classes
;
protected
Configurations
(
Collection
<
Class
<?>>
classes
)
{
Assert
.
notNull
(
classes
,
"Classes must not be null"
);
...
...
@@ -92,7 +92,7 @@ public abstract class Configurations {
/**
* Merge configurations.
* @param mergedClasses the merge classes
* @param mergedClasses the merge
d
classes
* @return a new configurations instance (must be of the same type as this instance)
*/
protected
abstract
Configurations
merge
(
Set
<
Class
<?>>
mergedClasses
);
...
...
spring-boot/src/main/java/org/springframework/boot/endpoint/web/mvc/AbstractWebEndpointServletHandlerMapping.java
View file @
30262e3b
...
...
@@ -72,7 +72,7 @@ public abstract class AbstractWebEndpointServletHandlerMapping
* operations of the given {@code webEndpoints}.
* @param endpointPath the path beneath which all endpoints should be mapped
* @param webEndpoints the web endpoints
* @param corsConfiguration the CORS configuraton for the endpoints
* @param corsConfiguration the CORS configurat
i
on for the endpoints
*/
public
AbstractWebEndpointServletHandlerMapping
(
String
endpointPath
,
Collection
<
EndpointInfo
<
WebEndpointOperation
>>
webEndpoints
,
...
...
spring-boot/src/main/java/org/springframework/boot/web/reactive/context/GenericReactiveWebApplicationContext.java
View file @
30262e3b
...
...
@@ -68,7 +68,7 @@ public class GenericReactiveWebApplicationContext
* {@link org.springframework.web.context.support.ServletContextResource} in a
* reactive web application.
* <p>
* {@link #exists()} always returns
null
in order to avoid exposing the whole
* {@link #exists()} always returns
{@code false}
in order to avoid exposing the whole
* classpath in a non-servlet environment.
*/
class
FilteredReactiveWebContextResource
extends
AbstractResource
{
...
...
spring-boot/src/test/java/org/springframework/boot/context/annotation/ConfigurationsTests.java
View file @
30262e3b
...
...
@@ -68,7 +68,6 @@ public class ConfigurationsTests {
Arrays
.
asList
(
String
.
class
,
Integer
.
class
));
Configurations
c4
=
new
TestConfigurations
(
Arrays
.
asList
(
Long
.
class
,
Byte
.
class
));
Class
<?>[]
classes
=
Configurations
.
getClasses
(
c1
,
c2
,
c3
,
c4
);
System
.
out
.
println
(
Arrays
.
asList
(
classes
));
assertThat
(
classes
).
containsExactly
(
Short
.
class
,
Long
.
class
,
Byte
.
class
,
InputStream
.
class
,
Integer
.
class
,
OutputStream
.
class
,
String
.
class
);
}
...
...
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