[ 
https://issues.apache.org/jira/browse/GROOVY-2807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149445#comment-18149445
 ] 

ASF GitHub Bot commented on GROOVY-2807:
----------------------------------------

codecov-commenter commented on PR #3333:
URL: https://github.com/apache/groovy/pull/3333#issuecomment-7087637163

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3333?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 75.0017%. Comparing base 
([`09e84fa`](https://app.codecov.io/gh/apache/groovy/commit/09e84fa4b0d4c37a5ac2efc48dfd2db93a84cab7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`89da22f`](https://app.codecov.io/gh/apache/groovy/commit/89da22f27a83b90e0b4cf6b31b3bd417f0fbacc4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3333/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/3333?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3333        +/-   ##
   ==================================================
   + Coverage     74.9518%   75.0017%   +0.0499%     
   - Complexity      48908      49060       +152     
   ==================================================
     Files            1768       1768                
     Lines          161213     161467       +254     
     Branches        31728      31820        +92     
   ==================================================
   + Hits           120832     121103       +271     
   + Misses          28968      28949        -19     
   - Partials        11413      11415         +2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3333?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...oovy-jmx/src/main/java/groovy/jmx/GroovyMBean.java](https://app.codecov.io/gh/apache/groovy/pull/3333?src=pr&el=tree&filepath=subprojects%2Fgroovy-jmx%2Fsrc%2Fmain%2Fjava%2Fgroovy%2Fjmx%2FGroovyMBean.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWpteC9zcmMvbWFpbi9qYXZhL2dyb292eS9qbXgvR3Jvb3Z5TUJlYW4uamF2YQ==)
 | `91.5119% <100.0000%> (+23.0271%)` | :arrow_up: |
   
   ... and [12 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3333/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> GroovyMBean does not support the use of overloaded MBean operations that have 
> the same number of parameters
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-2807
>                 URL: https://issues.apache.org/jira/browse/GROOVY-2807
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jmx
>            Reporter: Meyrick Kirby
>            Assignee: Daniel Sun
>            Priority: Major
>         Attachments: GroovyMBean.java
>
>
> I've been using groovy.util.GroovyMBean to access MBeans running on the JBoss 
> 4 server.  Some of the operations/methods of the MBeans are overloaded, e.g.:
> {code}
> void redeploy(java.lang.String url)
> void redeploy(java.net.URL url)
> void redeploy(org.jboss.deployment.DeploymentInfo sdi)
> {code}
> Currently it's impossible to invoke the first 2.
> The problem is, when the GroovyMBean is constructed it stores a signature for 
> each operation from its specified MBean in a HashMap, using the operation 
> name and the number of parameters as its key.  Later, when the invokeMethod 
> method is invoked, it uses the method name and the number of parameters to 
> retrieve the signature to invoke the operation on the MBean.  Thus for 
> overloaded operations with the same number of parameters, only the last 
> operation found will be stored in the HashMap.
> If another variant of the operation is invoked on the GroovyMBean then an 
> incorrect signature will be passed to the MBeanServer which results in an 
> exception occurring on the server.
> The fix I've used (suggested by a comment in the source code)  is to 
> construct a key out of the name of the operation and the sum of the hash 
> codes of the class names of the parameters.
> The problem is, this required 2 new createOperationKey methods:
> {code}
> String createOperationKey(MBeanOperationInfo opInfo)
> String createOperationKey(String method, Object[] args)
> {code}
> The first is invoked by the constructor, and the second that is invoked by 
> the invokeMethod method.  The original createOperationKey method is removed.  
> This might create backwards compatibility problems.
> I've included an adjusted GroovyMBean class, although temporarily in a new 
> package (groovy.util.adjusted).
> This issue is an extension of issue GROOVY-1291



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to