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
70d9602b
Commit
70d9602b
authored
Oct 29, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.2.x' into 2.3.x
Closes gh-23969
parents
eb77a20e
e7eb7739
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
TypeElementMembers.java
...ework/boot/configurationprocessor/TypeElementMembers.java
+2
-2
PropertyDescriptorResolverTests.java
...nfigurationprocessor/PropertyDescriptorResolverTests.java
+5
-1
HierarchicalPropertiesParent.java
...figurationsample/simple/HierarchicalPropertiesParent.java
+3
-2
No files found.
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeElementMembers.java
View file @
70d9602b
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -74,7 +74,7 @@ class TypeElementMembers {
private
void
processMethod
(
ExecutableElement
method
)
{
if
(
isPublic
(
method
))
{
String
name
=
method
.
getSimpleName
().
toString
();
if
(
isGetter
(
method
)
&&
!
this
.
publicGetters
.
containsKey
(
name
))
{
if
(
isGetter
(
method
)
&&
!
this
.
publicGetters
.
containsKey
(
getAccessorName
(
name
)
))
{
this
.
publicGetters
.
put
(
getAccessorName
(
name
),
method
);
}
else
if
(
isSetter
(
method
))
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/PropertyDescriptorResolverTests.java
View file @
70d9602b
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -75,6 +75,10 @@ class PropertyDescriptorResolverTests {
PropertyDescriptorResolver
resolver
=
new
PropertyDescriptorResolver
(
metadataEnv
);
assertThat
(
resolver
.
resolve
(
type
,
null
).
map
(
PropertyDescriptor:
:
getName
)).
containsExactly
(
"third"
,
"second"
,
"first"
);
assertThat
(
resolver
.
resolve
(
type
,
null
).
map
(
(
descriptor
)
->
descriptor
.
getGetter
().
getEnclosingElement
().
getSimpleName
().
toString
()))
.
containsExactly
(
"HierarchicalProperties"
,
"HierarchicalPropertiesParent"
,
"HierarchicalPropertiesParent"
);
assertThat
(
resolver
.
resolve
(
type
,
null
)
.
map
((
descriptor
)
->
descriptor
.
resolveItemMetadata
(
"test"
,
metadataEnv
))
.
map
(
ItemMetadata:
:
getDefaultValue
)).
containsExactly
(
"three"
,
"two"
,
"one"
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/simple/HierarchicalPropertiesParent.java
View file @
70d9602b
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -33,7 +33,8 @@ public abstract class HierarchicalPropertiesParent extends HierarchicalPropertie
this
.
second
=
second
;
}
// Useless override
// Overridden properties should belong to this class, not
// HierarchicalPropertiesGrandparent
@Override
public
String
getFirst
()
{
...
...
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