-
Notifications
You must be signed in to change notification settings - Fork 11
if a bean have multiple methods with same name corresponding to a configuration field, the methods can be returned randomly by the jvm and the search was not taken into account the implementation atttribute of a field to match the corresponding set method #52
if a bean have multiple methods with same name corresponding to a configuration field, the methods can be returned randomly by the jvm and the search was not taken into account the implementation atttribute of a field to match the corresponding set method #52
Conversation
…figuration field, the methods can be returned randomly by the jvm and the search was not taken into account the implementation atttribute of a field to match the corresponding set method Signed-off-by: Olivier Lamy <[email protected]>
issue found via Jetty issue jetty/jetty.project#11732 |
…lures depending on random return value of a jdk method Signed-off-by: Olivier Lamy <[email protected]>
FTR Apache Maven issue https://issues.apache.org/jira/browse/MNG-8116 |
@mcculls we might need som release thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
paramTypeHolder[0] = paramTypes[0]; | ||
return m; | ||
} | ||
} | ||
paramTypeHolder[0] = paramTypes[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this assignment should be moved inside the if(candidate == null)
block below, otherwise the returned param type won't be the type captured for the candidate but would be the type from the last method in the loop...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 once the paramType assignment for candidate
is fixed
Also can you run mvn spotless:apply
to fix up the formatting?
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
|
@mcculls thanks for merging! Would it be possible to have a release for integrating the fix with next Maven release? |
@@ -264,21 +264,35 @@ private Object convertProperty( final Class<?> beanType, final Class<?> rawPrope | |||
listener ); | |||
} | |||
|
|||
private static Method findMethod( final Class<?> beanType, final Type[] paramTypeHolder, final String methodName ) | |||
private Method findMethod( final Class<?> beanType, final Type[] paramTypeHolder, final String methodName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this was converted from class method to instance method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really intentional. but could it be a problem for a private method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's undo it, created #64
Signed-off-by: Olivier Lamy [email protected]