You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by mureinik <gi...@git.apache.org> on 2017/10/21 10:40:17 UTC

[GitHub] commons-lang pull request #301: Clean up EventUtilsTest

GitHub user mureinik opened a pull request:

    https://github.com/apache/commons-lang/pull/301

    Clean up EventUtilsTest

    Clean up the `EventUtilsTest` class in order to make it easier to read and maintain,

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

    $ git pull https://github.com/mureinik/commons-lang EventUtilsTest

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

    https://github.com/apache/commons-lang/pull/301.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 #301
    
----
commit 73d0c3617f392223b92e90f16365d7d2af649971
Author: Allon Mureinik <am...@redhat.com>
Date:   2017-10-21T10:29:06Z

    EventUtilsTest ExpectedException usage
    
    Use the ExpectedException @Rule to verify thrown exception instead of
    boiler-plate implementing its logic, in order to clean up the code
    and make it easier to read and maintain.

commit 182e3aac0c12f1043497c156042ef2b9deb14a0c
Author: Allon Mureinik <am...@redhat.com>
Date:   2017-10-21T10:31:42Z

    EventUtilsTest boxing
    
    Removed unnecessary explicit boxing and unboxing in order to make the
    code cleaner and easier to read.

----


---

[GitHub] commons-lang pull request #301: Clean up EventUtilsTest

Posted by britter <gi...@git.apache.org>.
Github user britter commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/301#discussion_r146108051
  
    --- Diff: src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java ---
    @@ -135,9 +129,9 @@ public void testBindFilteredEventsToMethod() {
             final EventCounter counter = new EventCounter();
             EventUtils.bindEventsToMethod(counter, "eventOccurred", src, MultipleEventListener.class, "event1");
             assertEquals(0, counter.getCount());
    -        src.listeners.fire().event1(new PropertyChangeEvent(new Date(), "Day", Integer.valueOf(0), Integer.valueOf(1)));
    +        src.listeners.fire().event1(new PropertyChangeEvent(new Date(), "Day", 0, 1));
    --- End diff --
    
    We prefer explicit boxing of primitve values.


---

[GitHub] commons-lang issue #301: Clean up EventUtilsTest

Posted by mureinik <gi...@git.apache.org>.
Github user mureinik commented on the issue:

    https://github.com/apache/commons-lang/pull/301
  
    The CI failure is unrelated to this PR, and also occurs on master. PR #302 should fix those errors, and once it's merged, I'll rebase this PR on top of it.


---

[GitHub] commons-lang pull request #301: Clean up EventUtilsTest

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

    https://github.com/apache/commons-lang/pull/301


---

[GitHub] commons-lang issue #301: Clean up EventUtilsTest

Posted by britter <gi...@git.apache.org>.
Github user britter commented on the issue:

    https://github.com/apache/commons-lang/pull/301
  
    Thank you!
    
    Don't forget to have a look at CONTRIBUTING.md. If you intend to contribute on a regular basis, it would be great if you could sign an Indivicual Contributor License Agreement.


---

[GitHub] commons-lang issue #301: Clean up EventUtilsTest

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/301
  
    
    [![Coverage Status](https://coveralls.io/builds/13825681/badge)](https://coveralls.io/builds/13825681)
    
    Coverage remained the same at 95.2% when pulling **95fce758b0e12837869cae450d8029d7237b0dbb on mureinik:EventUtilsTest** into **6276d0f8441fec3b4a94d6f3aaaa0024b85e2317 on apache:master**.



---

[GitHub] commons-lang issue #301: Clean up EventUtilsTest

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/301
  
    
    [![Coverage Status](https://coveralls.io/builds/13825693/badge)](https://coveralls.io/builds/13825693)
    
    Coverage decreased (-0.001%) to 95.199% when pulling **95fce758b0e12837869cae450d8029d7237b0dbb on mureinik:EventUtilsTest** into **6276d0f8441fec3b4a94d6f3aaaa0024b85e2317 on apache:master**.



---

[GitHub] commons-lang issue #301: Clean up EventUtilsTest

Posted by mureinik <gi...@git.apache.org>.
Github user mureinik commented on the issue:

    https://github.com/apache/commons-lang/pull/301
  
    Changes since previous push:
    
    1. Removed the patch regarding autoboxing, as per @britter's review
    2. Rebased in order to consume the CI fixes merged to master


---