You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by srdo <gi...@git.apache.org> on 2018/05/28 20:55:44 UTC

[GitHub] storm pull request #2695: STORM-3087: Make FluxBuilder.canInvokeWithArgs che...

GitHub user srdo opened a pull request:

    https://github.com/apache/storm/pull/2695

    STORM-3087: Make FluxBuilder.canInvokeWithArgs check whether the actu…

    …al argument type is assignable to Number before deciding that a method with a primitive parameter can be invoked
    
    https://issues.apache.org/jira/browse/STORM-3087
    
    The added test checks whether Flux throws an IllegalArgumentException because it couldn't find the right method, or because it found the wrong method and tried to call it (in which case the IAE would have a null message).
    
    A more useful example would be trying to use code like this:
    
    ```
    public MyClass(String s){}
    public MyClass(long l){}
    ```
    
    Using a topology definition that tries to invoke the String-typed constructor, Flux will sometimes erroneously pick the long-type constructor instead. The test is the way it is because trying to test an example like this will inherently be flaky, since the order Flux encounters methods in is random.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/srdo/storm STORM-3087

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/2695.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2695
    
----
commit 1ebdf301edbd3bac1ff9416d971ee6e7738891ce
Author: Stig Rohde Døssing <sr...@...>
Date:   2018-05-28T20:47:15Z

    STORM-3087: Make FluxBuilder.canInvokeWithArgs check whether the actual argument type is assignable to Number before deciding that a method with a primitive parameter can be invoked

----


---

[GitHub] storm pull request #2695: STORM-3087: Make FluxBuilder.canInvokeWithArgs che...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/2695


---