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
577d5c97
Commit
577d5c97
authored
Dec 03, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15215 from dreis2211
* pr/15215: Avoid premature declaration of variables
parents
6d2a91ed
f57f16c1
Changes
4
Show 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 @
577d5c97
...
@@ -91,12 +91,12 @@ class CloudFoundryWebEndpointServletHandlerMapping
...
@@ -91,12 +91,12 @@ class CloudFoundryWebEndpointServletHandlerMapping
}
}
AccessLevel
accessLevel
=
(
AccessLevel
)
request
AccessLevel
accessLevel
=
(
AccessLevel
)
request
.
getAttribute
(
AccessLevel
.
REQUEST_ATTRIBUTE
);
.
getAttribute
(
AccessLevel
.
REQUEST_ATTRIBUTE
);
Map
<
String
,
Link
>
links
=
CloudFoundryWebEndpointServletHandlerMapping
.
this
.
linksResolver
.
resolveLinks
(
request
.
getRequestURL
().
toString
());
Map
<
String
,
Link
>
filteredLinks
=
new
LinkedHashMap
<>();
Map
<
String
,
Link
>
filteredLinks
=
new
LinkedHashMap
<>();
if
(
accessLevel
==
null
)
{
if
(
accessLevel
==
null
)
{
return
Collections
.
singletonMap
(
"_links"
,
filteredLinks
);
return
Collections
.
singletonMap
(
"_links"
,
filteredLinks
);
}
}
Map
<
String
,
Link
>
links
=
CloudFoundryWebEndpointServletHandlerMapping
.
this
.
linksResolver
.
resolveLinks
(
request
.
getRequestURL
().
toString
());
filteredLinks
=
links
.
entrySet
().
stream
()
filteredLinks
=
links
.
entrySet
().
stream
()
.
filter
((
e
)
->
e
.
getKey
().
equals
(
"self"
)
.
filter
((
e
)
->
e
.
getKey
().
equals
(
"self"
)
||
accessLevel
.
isAccessAllowed
(
e
.
getKey
()))
||
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 @
577d5c97
...
@@ -42,11 +42,11 @@ public enum ManagementPortType {
...
@@ -42,11 +42,11 @@ public enum ManagementPortType {
DIFFERENT
;
DIFFERENT
;
static
ManagementPortType
get
(
Environment
environment
)
{
static
ManagementPortType
get
(
Environment
environment
)
{
Integer
serverPort
=
getPortProperty
(
environment
,
"server."
);
Integer
managementPort
=
getPortProperty
(
environment
,
"management.server."
);
Integer
managementPort
=
getPortProperty
(
environment
,
"management.server."
);
if
(
managementPort
!=
null
&&
managementPort
<
0
)
{
if
(
managementPort
!=
null
&&
managementPort
<
0
)
{
return
DISABLED
;
return
DISABLED
;
}
}
Integer
serverPort
=
getPortProperty
(
environment
,
"server."
);
return
((
managementPort
==
null
return
((
managementPort
==
null
||
(
serverPort
==
null
&&
managementPort
.
equals
(
8080
))
||
(
serverPort
==
null
&&
managementPort
.
equals
(
8080
))
||
(
managementPort
!=
0
&&
managementPort
.
equals
(
serverPort
)))
?
SAME
||
(
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 @
577d5c97
...
@@ -120,7 +120,6 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
...
@@ -120,7 +120,6 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
if
(
skip
==
SkipPropertyMapping
.
YES
)
{
if
(
skip
==
SkipPropertyMapping
.
YES
)
{
return
;
return
;
}
}
String
name
=
getName
(
typeMapping
,
attributeMapping
,
attribute
);
ReflectionUtils
.
makeAccessible
(
attribute
);
ReflectionUtils
.
makeAccessible
(
attribute
);
Object
value
=
ReflectionUtils
.
invokeMethod
(
attribute
,
annotation
);
Object
value
=
ReflectionUtils
.
invokeMethod
(
attribute
,
annotation
);
if
(
skip
==
SkipPropertyMapping
.
ON_DEFAULT_VALUE
)
{
if
(
skip
==
SkipPropertyMapping
.
ON_DEFAULT_VALUE
)
{
...
@@ -130,6 +129,7 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
...
@@ -130,6 +129,7 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
return
;
return
;
}
}
}
}
String
name
=
getName
(
typeMapping
,
attributeMapping
,
attribute
);
putProperties
(
name
,
value
,
properties
);
putProperties
(
name
,
value
,
properties
);
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindConverter.java
View file @
577d5c97
...
@@ -242,12 +242,12 @@ final class BindConverter {
...
@@ -242,12 +242,12 @@ final class BindConverter {
}
}
private
PropertyEditor
getPropertyEditor
(
Class
<?>
type
)
{
private
PropertyEditor
getPropertyEditor
(
Class
<?>
type
)
{
SimpleTypeConverter
typeConverter
=
this
.
typeConverter
;
if
(
type
==
null
||
type
==
Object
.
class
if
(
type
==
null
||
type
==
Object
.
class
||
Collection
.
class
.
isAssignableFrom
(
type
)
||
Collection
.
class
.
isAssignableFrom
(
type
)
||
Map
.
class
.
isAssignableFrom
(
type
))
{
||
Map
.
class
.
isAssignableFrom
(
type
))
{
return
null
;
return
null
;
}
}
SimpleTypeConverter
typeConverter
=
this
.
typeConverter
;
PropertyEditor
editor
=
typeConverter
.
getDefaultEditor
(
type
);
PropertyEditor
editor
=
typeConverter
.
getDefaultEditor
(
type
);
if
(
editor
==
null
)
{
if
(
editor
==
null
)
{
editor
=
typeConverter
.
findCustomEditor
(
type
,
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