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
f57f16c1
Commit
f57f16c1
authored
Nov 19, 2018
by
dreis2211
Committed by
Stephane Nicoll
Dec 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid premature declaration of variables
Closes gh-15215
parent
6d2a91ed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
CloudFoundryWebEndpointServletHandlerMapping.java
...servlet/CloudFoundryWebEndpointServletHandlerMapping.java
+2
-2
ManagementPortType.java
.../actuate/autoconfigure/web/server/ManagementPortType.java
+1
-1
AnnotationsPropertySource.java
...t/autoconfigure/properties/AnnotationsPropertySource.java
+1
-1
BindConverter.java
...framework/boot/context/properties/bind/BindConverter.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryWebEndpointServletHandlerMapping.java
View file @
f57f16c1
...
...
@@ -91,12 +91,12 @@ class CloudFoundryWebEndpointServletHandlerMapping
}
AccessLevel
accessLevel
=
(
AccessLevel
)
request
.
getAttribute
(
AccessLevel
.
REQUEST_ATTRIBUTE
);
Map
<
String
,
Link
>
links
=
CloudFoundryWebEndpointServletHandlerMapping
.
this
.
linksResolver
.
resolveLinks
(
request
.
getRequestURL
().
toString
());
Map
<
String
,
Link
>
filteredLinks
=
new
LinkedHashMap
<>();
if
(
accessLevel
==
null
)
{
return
Collections
.
singletonMap
(
"_links"
,
filteredLinks
);
}
Map
<
String
,
Link
>
links
=
CloudFoundryWebEndpointServletHandlerMapping
.
this
.
linksResolver
.
resolveLinks
(
request
.
getRequestURL
().
toString
());
filteredLinks
=
links
.
entrySet
().
stream
()
.
filter
((
e
)
->
e
.
getKey
().
equals
(
"self"
)
||
accessLevel
.
isAccessAllowed
(
e
.
getKey
()))
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementPortType.java
View file @
f57f16c1
...
...
@@ -42,11 +42,11 @@ public enum ManagementPortType {
DIFFERENT
;
static
ManagementPortType
get
(
Environment
environment
)
{
Integer
serverPort
=
getPortProperty
(
environment
,
"server."
);
Integer
managementPort
=
getPortProperty
(
environment
,
"management.server."
);
if
(
managementPort
!=
null
&&
managementPort
<
0
)
{
return
DISABLED
;
}
Integer
serverPort
=
getPortProperty
(
environment
,
"server."
);
return
((
managementPort
==
null
||
(
serverPort
==
null
&&
managementPort
.
equals
(
8080
))
||
(
managementPort
!=
0
&&
managementPort
.
equals
(
serverPort
)))
?
SAME
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/AnnotationsPropertySource.java
View file @
f57f16c1
...
...
@@ -120,7 +120,6 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
if
(
skip
==
SkipPropertyMapping
.
YES
)
{
return
;
}
String
name
=
getName
(
typeMapping
,
attributeMapping
,
attribute
);
ReflectionUtils
.
makeAccessible
(
attribute
);
Object
value
=
ReflectionUtils
.
invokeMethod
(
attribute
,
annotation
);
if
(
skip
==
SkipPropertyMapping
.
ON_DEFAULT_VALUE
)
{
...
...
@@ -130,6 +129,7 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
return
;
}
}
String
name
=
getName
(
typeMapping
,
attributeMapping
,
attribute
);
putProperties
(
name
,
value
,
properties
);
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindConverter.java
View file @
f57f16c1
...
...
@@ -242,12 +242,12 @@ final class BindConverter {
}
private
PropertyEditor
getPropertyEditor
(
Class
<?>
type
)
{
SimpleTypeConverter
typeConverter
=
this
.
typeConverter
;
if
(
type
==
null
||
type
==
Object
.
class
||
Collection
.
class
.
isAssignableFrom
(
type
)
||
Map
.
class
.
isAssignableFrom
(
type
))
{
return
null
;
}
SimpleTypeConverter
typeConverter
=
this
.
typeConverter
;
PropertyEditor
editor
=
typeConverter
.
getDefaultEditor
(
type
);
if
(
editor
==
null
)
{
editor
=
typeConverter
.
findCustomEditor
(
type
,
null
);
...
...
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