You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "SeasonPanPan (via GitHub)" <gi...@apache.org> on 2023/02/22 15:04:32 UTC

[GitHub] [commons-lang] SeasonPanPan opened a new pull request, #1032: [LANG-1694]'MethodUtils.getMatchingMethod' fails with "Found multiple candidates" when the method is abstract

SeasonPanPan opened a new pull request, #1032:
URL: https://github.com/apache/commons-lang/pull/1032

   JIRA: [https://issues.apache.org/jira/browse/LANG-1694](https://issues.apache.org/jira/browse/LANG-1694)
   
   MethodUtils.getMatchingMethod() fails with "Found multiple candidates for method" message if the method is **an override of an abstract method** and parameter types do not exactly match the declared types.
   
   The behavior of this method has changed between versions 3.11 and 3.12.0. Previously, the method would pick the first method that matches the signature and replace it only if a method with a more specific signature is found. Maybe it's a compatibility issue.
   
   Fix: Keep only one candidate to return directly, if there are more than two candidates, continue to compare whether the declaration classes of the first two methods are the same, if not, also consider the first method the best match(Class itself).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-lang] garydgregory commented on pull request #1032: [LANG-1694]'MethodUtils.getMatchingMethod' fails with "Found multiple candidates" when the method is abstract

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1032:
URL: https://github.com/apache/commons-lang/pull/1032#issuecomment-1440732209

   @SeasonPanPan 
   Run 'mvn' before pushing to catch broken builds.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-lang] codecov-commenter commented on pull request #1032: [LANG-1694]'MethodUtils.getMatchingMethod' fails with "Found multiple candidates" when the method is abstract

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1032:
URL: https://github.com/apache/commons-lang/pull/1032#issuecomment-1441247653

   # [Codecov](https://codecov.io/gh/apache/commons-lang/pull/1032?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1032](https://codecov.io/gh/apache/commons-lang/pull/1032?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2d3a3e1) into [master](https://codecov.io/gh/apache/commons-lang/commit/469013a4f5a5cb666b35d72122690bb7f355c0b5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (469013a) will **decrease** coverage by `0.01%`.
   > The diff coverage is `75.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1032      +/-   ##
   ============================================
   - Coverage     92.07%   92.06%   -0.01%     
   - Complexity     7477     7478       +1     
   ============================================
     Files           194      194              
     Lines         15716    15718       +2     
     Branches       2897     2898       +1     
   ============================================
   + Hits          14470    14471       +1     
     Misses          674      674              
   - Partials        572      573       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/commons-lang/pull/1032?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/commons/lang3/reflect/MethodUtils.java](https://codecov.io/gh/apache/commons-lang/pull/1032?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvcmVmbGVjdC9NZXRob2RVdGlscy5qYXZh) | `89.91% <75.00%> (-0.33%)` | :arrow_down: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-lang] SeasonPanPan closed pull request #1032: [LANG-1694]'MethodUtils.getMatchingMethod' fails with "Found multiple candidates" when the method is abstract

Posted by "SeasonPanPan (via GitHub)" <gi...@apache.org>.
SeasonPanPan closed pull request #1032: [LANG-1694]'MethodUtils.getMatchingMethod' fails with "Found multiple candidates" when the method is abstract
URL: https://github.com/apache/commons-lang/pull/1032


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org