-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Closed
Copy link
Description
Consider the following:
@ConfigurationProperties("test")
@ConstructorBinding
public class TestProperties {
public TestProperties(String property, int counter) { ... }
}
And the current code:
Lines 247 to 248 in d254c62
Constructor<?> bindConstructor = BindMethod.findBindConstructor(type); | |
BindMethod bindMethod = (bindConstructor != null) ? BindMethod.VALUE_OBJECT : BindMethod.forClass(type); |
BindMethod.findBindConstructor(TestProperties.class)
will return null
as it does not test the fact @ConstructorBinding
is specified at class level. However, BindMethod.forClass(type)
will work as it has the extra assertion.
The current code arrangement feels a bit weird considering we have a dedicated method to retrieve the relevant constructor and that returns null
whereas it shouldn't.
Metadata
Metadata
Assignees
Labels
type: taskA general taskA general task