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
cc46977c
Commit
cc46977c
authored
Aug 18, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10033 from izeye:instanceof
* pr/10033: Remove null check before instanceof
parents
74c5e487
94394676
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
ConfigurationMetadataAnnotationProcessor.java
...onprocessor/ConfigurationMetadataAnnotationProcessor.java
+4
-7
No files found.
spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java
View file @
cc46977c
...
...
@@ -338,8 +338,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
boolean
isNested
=
isNested
(
returnElement
,
field
,
element
);
AnnotationMirror
annotation
=
getAnnotation
(
getter
,
configurationPropertiesAnnotation
());
if
(
returnElement
!=
null
&&
returnElement
instanceof
TypeElement
&&
annotation
==
null
&&
isNested
)
{
if
(
returnElement
instanceof
TypeElement
&&
annotation
==
null
&&
isNested
)
{
String
nestedPrefix
=
ConfigurationMetadata
.
nestedPrefix
(
prefix
,
name
);
this
.
metadataCollector
.
add
(
ItemMetadata
.
newGroup
(
nestedPrefix
,
this
.
typeUtils
.
getQualifiedName
(
returnElement
),
...
...
@@ -419,8 +418,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
}
private
Element
getTopLevelType
(
Element
element
)
{
if
((
element
.
getEnclosingElement
()
==
null
)
||
!(
element
.
getEnclosingElement
()
instanceof
TypeElement
))
{
if
(!(
element
.
getEnclosingElement
()
instanceof
TypeElement
))
{
return
element
;
}
return
getTopLevelType
(
element
.
getEnclosingElement
());
...
...
@@ -430,8 +428,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
if
(
isElementDeprecated
(
element
))
{
return
true
;
}
if
(
element
!=
null
&&
(
element
instanceof
VariableElement
||
element
instanceof
ExecutableElement
))
{
if
(
element
instanceof
VariableElement
||
element
instanceof
ExecutableElement
)
{
return
isElementDeprecated
(
element
.
getEnclosingElement
());
}
return
false
;
...
...
@@ -535,7 +532,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
}
static
EndpointTypes
parse
(
Object
typesAttribute
)
{
if
(
typesAttribute
==
null
||
!(
typesAttribute
instanceof
List
))
{
if
(!(
typesAttribute
instanceof
List
))
{
return
new
EndpointTypes
(
ALL_TYPES
);
}
List
<
AnnotationValue
>
values
=
(
List
<
AnnotationValue
>)
typesAttribute
;
...
...
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