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
9ece2e27
Commit
9ece2e27
authored
Oct 26, 2019
by
dreis2211
Committed by
Stephane Nicoll
Oct 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant explicit types
See gh-18754
parent
ee0a66a2
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
11 additions
and
12 deletions
+11
-12
AutoConfiguredHealthEndpointGroups.java
...oconfigure/health/AutoConfiguredHealthEndpointGroups.java
+1
-1
HealthAggregatorStatusAggregatorAdapter.java
...igure/health/HealthAggregatorStatusAggregatorAdapter.java
+1
-1
HealthContributorRegistryHealthIndicatorRegistryAdapter.java
...lthContributorRegistryHealthIndicatorRegistryAdapter.java
+1
-1
HealthIndicatorProperties.java
...tuate/autoconfigure/health/HealthIndicatorProperties.java
+1
-1
HealthEndpointSupport.java
...gframework/boot/actuate/health/HealthEndpointSupport.java
+1
-1
SimpleHttpCodeStatusMapper.java
...ework/boot/actuate/health/SimpleHttpCodeStatusMapper.java
+1
-1
SimpleStatusAggregator.java
...framework/boot/actuate/health/SimpleStatusAggregator.java
+1
-1
HealthEndpointWebIntegrationTests.java
...oot/actuate/health/HealthEndpointWebIntegrationTests.java
+1
-2
NamedContributorsMapAdapterTests.java
...boot/actuate/health/NamedContributorsMapAdapterTests.java
+1
-1
BasicErrorController.java
...autoconfigure/web/servlet/error/BasicErrorController.java
+1
-1
LenientObjectToEnumConverterFactory.java
...ork/boot/convert/LenientObjectToEnumConverterFactory.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/AutoConfiguredHealthEndpointGroups.java
View file @
9ece2e27
...
@@ -85,7 +85,7 @@ class AutoConfiguredHealthEndpointGroups implements HealthEndpointGroups {
...
@@ -85,7 +85,7 @@ class AutoConfiguredHealthEndpointGroups implements HealthEndpointGroups {
private
Map
<
String
,
HealthEndpointGroup
>
createGroups
(
Map
<
String
,
Group
>
groupProperties
,
BeanFactory
beanFactory
,
private
Map
<
String
,
HealthEndpointGroup
>
createGroups
(
Map
<
String
,
Group
>
groupProperties
,
BeanFactory
beanFactory
,
StatusAggregator
defaultStatusAggregator
,
HttpCodeStatusMapper
defaultHttpCodeStatusMapper
,
StatusAggregator
defaultStatusAggregator
,
HttpCodeStatusMapper
defaultHttpCodeStatusMapper
,
Show
defaultShowComponents
,
Show
defaultShowDetails
,
Set
<
String
>
defaultRoles
)
{
Show
defaultShowComponents
,
Show
defaultShowDetails
,
Set
<
String
>
defaultRoles
)
{
Map
<
String
,
HealthEndpointGroup
>
groups
=
new
LinkedHashMap
<
String
,
HealthEndpointGroup
>();
Map
<
String
,
HealthEndpointGroup
>
groups
=
new
LinkedHashMap
<>();
groupProperties
.
forEach
((
groupName
,
group
)
->
{
groupProperties
.
forEach
((
groupName
,
group
)
->
{
Status
status
=
group
.
getStatus
();
Status
status
=
group
.
getStatus
();
Show
showComponents
=
(
group
.
getShowComponents
()
!=
null
)
?
group
.
getShowComponents
()
Show
showComponents
=
(
group
.
getShowComponents
()
!=
null
)
?
group
.
getShowComponents
()
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthAggregatorStatusAggregatorAdapter.java
View file @
9ece2e27
...
@@ -43,7 +43,7 @@ class HealthAggregatorStatusAggregatorAdapter implements StatusAggregator {
...
@@ -43,7 +43,7 @@ class HealthAggregatorStatusAggregatorAdapter implements StatusAggregator {
@Override
@Override
public
Status
getAggregateStatus
(
Set
<
Status
>
statuses
)
{
public
Status
getAggregateStatus
(
Set
<
Status
>
statuses
)
{
int
index
=
0
;
int
index
=
0
;
Map
<
String
,
Health
>
healths
=
new
LinkedHashMap
<
String
,
Health
>();
Map
<
String
,
Health
>
healths
=
new
LinkedHashMap
<>();
for
(
Status
status
:
statuses
)
{
for
(
Status
status
:
statuses
)
{
index
++;
index
++;
healths
.
put
(
"health"
+
index
,
asHealth
(
status
));
healths
.
put
(
"health"
+
index
,
asHealth
(
status
));
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthContributorRegistryHealthIndicatorRegistryAdapter.java
View file @
9ece2e27
...
@@ -67,7 +67,7 @@ class HealthContributorRegistryHealthIndicatorRegistryAdapter implements HealthI
...
@@ -67,7 +67,7 @@ class HealthContributorRegistryHealthIndicatorRegistryAdapter implements HealthI
@Override
@Override
public
Map
<
String
,
HealthIndicator
>
getAll
()
{
public
Map
<
String
,
HealthIndicator
>
getAll
()
{
Map
<
String
,
HealthIndicator
>
all
=
new
LinkedHashMap
<
String
,
HealthIndicator
>();
Map
<
String
,
HealthIndicator
>
all
=
new
LinkedHashMap
<>();
for
(
NamedContributor
<?>
namedContributor
:
this
.
contributorRegistry
)
{
for
(
NamedContributor
<?>
namedContributor
:
this
.
contributorRegistry
)
{
if
(
namedContributor
.
getContributor
()
instanceof
HealthIndicator
)
{
if
(
namedContributor
.
getContributor
()
instanceof
HealthIndicator
)
{
all
.
put
(
namedContributor
.
getName
(),
(
HealthIndicator
)
namedContributor
.
getContributor
());
all
.
put
(
namedContributor
.
getName
(),
(
HealthIndicator
)
namedContributor
.
getContributor
());
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthIndicatorProperties.java
View file @
9ece2e27
...
@@ -37,7 +37,7 @@ public class HealthIndicatorProperties {
...
@@ -37,7 +37,7 @@ public class HealthIndicatorProperties {
private
List
<
String
>
order
=
new
ArrayList
<>();
private
List
<
String
>
order
=
new
ArrayList
<>();
private
final
Map
<
String
,
Integer
>
httpMapping
=
new
LinkedHashMap
<
String
,
Integer
>();
private
final
Map
<
String
,
Integer
>
httpMapping
=
new
LinkedHashMap
<>();
@DeprecatedConfigurationProperty
(
replacement
=
"management.endpoint.health.status.order"
)
@DeprecatedConfigurationProperty
(
replacement
=
"management.endpoint.health.status.order"
)
public
List
<
String
>
getOrder
()
{
public
List
<
String
>
getOrder
()
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpointSupport.java
View file @
9ece2e27
...
@@ -80,7 +80,7 @@ abstract class HealthEndpointSupport<C, T> {
...
@@ -80,7 +80,7 @@ abstract class HealthEndpointSupport<C, T> {
Object
contributor
=
getContributor
(
path
,
pathOffset
);
Object
contributor
=
getContributor
(
path
,
pathOffset
);
T
health
=
getContribution
(
apiVersion
,
group
,
contributor
,
showComponents
,
showDetails
,
T
health
=
getContribution
(
apiVersion
,
group
,
contributor
,
showComponents
,
showDetails
,
isSystemHealth
?
this
.
groups
.
getNames
()
:
null
);
isSystemHealth
?
this
.
groups
.
getNames
()
:
null
);
return
(
health
!=
null
)
?
new
HealthResult
<
T
>(
health
,
group
)
:
null
;
return
(
health
!=
null
)
?
new
HealthResult
<>(
health
,
group
)
:
null
;
}
}
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/SimpleHttpCodeStatusMapper.java
View file @
9ece2e27
...
@@ -66,7 +66,7 @@ public class SimpleHttpCodeStatusMapper implements HttpCodeStatusMapper {
...
@@ -66,7 +66,7 @@ public class SimpleHttpCodeStatusMapper implements HttpCodeStatusMapper {
}
}
private
static
Map
<
String
,
Integer
>
getUniformMappings
(
Map
<
String
,
Integer
>
mappings
)
{
private
static
Map
<
String
,
Integer
>
getUniformMappings
(
Map
<
String
,
Integer
>
mappings
)
{
Map
<
String
,
Integer
>
result
=
new
LinkedHashMap
<
String
,
Integer
>();
Map
<
String
,
Integer
>
result
=
new
LinkedHashMap
<>();
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
mappings
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
mappings
.
entrySet
())
{
String
code
=
getUniformCode
(
entry
.
getKey
());
String
code
=
getUniformCode
(
entry
.
getKey
());
if
(
code
!=
null
)
{
if
(
code
!=
null
)
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/SimpleStatusAggregator.java
View file @
9ece2e27
...
@@ -38,7 +38,7 @@ public class SimpleStatusAggregator implements StatusAggregator {
...
@@ -38,7 +38,7 @@ public class SimpleStatusAggregator implements StatusAggregator {
private
static
final
List
<
String
>
DEFAULT_ORDER
;
private
static
final
List
<
String
>
DEFAULT_ORDER
;
static
{
static
{
List
<
String
>
defaultOrder
=
new
ArrayList
<
String
>();
List
<
String
>
defaultOrder
=
new
ArrayList
<>();
defaultOrder
.
add
(
Status
.
DOWN
.
getCode
());
defaultOrder
.
add
(
Status
.
DOWN
.
getCode
());
defaultOrder
.
add
(
Status
.
OUT_OF_SERVICE
.
getCode
());
defaultOrder
.
add
(
Status
.
OUT_OF_SERVICE
.
getCode
());
defaultOrder
.
add
(
Status
.
UP
.
getCode
());
defaultOrder
.
add
(
Status
.
UP
.
getCode
());
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java
View file @
9ece2e27
...
@@ -177,8 +177,7 @@ class HealthEndpointWebIntegrationTests {
...
@@ -177,8 +177,7 @@ class HealthEndpointWebIntegrationTests {
ReactiveHealthContributorRegistry
reactiveHealthContributorRegistry
(
ReactiveHealthContributorRegistry
reactiveHealthContributorRegistry
(
Map
<
String
,
HealthContributor
>
healthContributorBeans
,
Map
<
String
,
HealthContributor
>
healthContributorBeans
,
Map
<
String
,
ReactiveHealthContributor
>
reactiveHealthContributorBeans
)
{
Map
<
String
,
ReactiveHealthContributor
>
reactiveHealthContributorBeans
)
{
Map
<
String
,
ReactiveHealthContributor
>
allIndicators
=
new
LinkedHashMap
<
String
,
ReactiveHealthContributor
>(
Map
<
String
,
ReactiveHealthContributor
>
allIndicators
=
new
LinkedHashMap
<>(
reactiveHealthContributorBeans
);
reactiveHealthContributorBeans
);
healthContributorBeans
.
forEach
((
name
,
contributor
)
->
allIndicators
.
computeIfAbsent
(
name
,
healthContributorBeans
.
forEach
((
name
,
contributor
)
->
allIndicators
.
computeIfAbsent
(
name
,
(
key
)
->
ReactiveHealthContributor
.
adapt
(
contributor
)));
(
key
)
->
ReactiveHealthContributor
.
adapt
(
contributor
)));
return
new
DefaultReactiveHealthContributorRegistry
(
allIndicators
);
return
new
DefaultReactiveHealthContributorRegistry
(
allIndicators
);
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/NamedContributorsMapAdapterTests.java
View file @
9ece2e27
...
@@ -91,7 +91,7 @@ class NamedContributorsMapAdapterTests {
...
@@ -91,7 +91,7 @@ class NamedContributorsMapAdapterTests {
}
}
private
TestNamedContributorsMapAdapter
<
String
>
createAdapter
()
{
private
TestNamedContributorsMapAdapter
<
String
>
createAdapter
()
{
Map
<
String
,
String
>
map
=
new
LinkedHashMap
<
String
,
String
>();
Map
<
String
,
String
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"one"
,
"one"
);
map
.
put
(
"one"
,
"one"
);
map
.
put
(
"two"
,
"two"
);
map
.
put
(
"two"
,
"two"
);
TestNamedContributorsMapAdapter
<
String
>
adapter
=
new
TestNamedContributorsMapAdapter
<>(
map
,
this
::
reverse
);
TestNamedContributorsMapAdapter
<
String
>
adapter
=
new
TestNamedContributorsMapAdapter
<>(
map
,
this
::
reverse
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java
View file @
9ece2e27
...
@@ -96,7 +96,7 @@ public class BasicErrorController extends AbstractErrorController {
...
@@ -96,7 +96,7 @@ public class BasicErrorController extends AbstractErrorController {
public
ResponseEntity
<
Map
<
String
,
Object
>>
error
(
HttpServletRequest
request
)
{
public
ResponseEntity
<
Map
<
String
,
Object
>>
error
(
HttpServletRequest
request
)
{
HttpStatus
status
=
getStatus
(
request
);
HttpStatus
status
=
getStatus
(
request
);
if
(
status
==
HttpStatus
.
NO_CONTENT
)
{
if
(
status
==
HttpStatus
.
NO_CONTENT
)
{
return
new
ResponseEntity
<
Map
<
String
,
Object
>
>(
status
);
return
new
ResponseEntity
<>(
status
);
}
}
Map
<
String
,
Object
>
body
=
getErrorAttributes
(
request
,
isIncludeStackTrace
(
request
,
MediaType
.
ALL
));
Map
<
String
,
Object
>
body
=
getErrorAttributes
(
request
,
isIncludeStackTrace
(
request
,
MediaType
.
ALL
));
return
new
ResponseEntity
<>(
body
,
status
);
return
new
ResponseEntity
<>(
body
,
status
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/LenientObjectToEnumConverterFactory.java
View file @
9ece2e27
...
@@ -55,7 +55,7 @@ abstract class LenientObjectToEnumConverterFactory<T> implements ConverterFactor
...
@@ -55,7 +55,7 @@ abstract class LenientObjectToEnumConverterFactory<T> implements ConverterFactor
enumType
=
enumType
.
getSuperclass
();
enumType
=
enumType
.
getSuperclass
();
}
}
Assert
.
notNull
(
enumType
,
()
->
"The target type "
+
targetType
.
getName
()
+
" does not refer to an enum"
);
Assert
.
notNull
(
enumType
,
()
->
"The target type "
+
targetType
.
getName
()
+
" does not refer to an enum"
);
return
new
LenientToEnumConverter
<
E
>((
Class
<
E
>)
enumType
);
return
new
LenientToEnumConverter
<>((
Class
<
E
>)
enumType
);
}
}
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
...
...
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