You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by JiangYongKang <gi...@git.apache.org> on 2018/03/01 09:31:10 UTC

[GitHub] commons-lang pull request #318: clean code

GitHub user JiangYongKang opened a pull request:

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

    clean code

    Implement the existing functionality with fewer code.

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

    $ git pull https://github.com/JiangYongKang/commons-lang master

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

    https://github.com/apache/commons-lang/pull/318.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 #318
    
----
commit 0580fe794d27bfaccb0bd0159b2e633a9fc32384
Author: vincent <vi...@...>
Date:   2018-03-01T09:25:29Z

    clean code

----


---

[GitHub] commons-lang issue #318: clean code

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

    https://github.com/apache/commons-lang/pull/318
  
    @stokito thinks


---

[GitHub] commons-lang issue #318: clean code

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

    https://github.com/apache/commons-lang/pull/318
  
    @JiangYongKang, thanks for your contribution.
    
    Even though the behaviour is the same, in my opinion, the other code is easier to read, and fewer code doesn't necessarily mean better or more clean code.
    
    Checking if a number if even or odd, for example, can be done with bit operation, or with a `if/else`. While the former is shorter, not all developers immediately understand it, nor know how to maintain/change it.


---

[GitHub] commons-lang issue #318: clean code

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

    https://github.com/apache/commons-lang/pull/318
  
    Changes are ok


---

[GitHub] commons-lang issue #318: clean code

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

    https://github.com/apache/commons-lang/pull/318
  
    
    [![Coverage Status](https://coveralls.io/builds/15755250/badge)](https://coveralls.io/builds/15755250)
    
    Coverage decreased (-0.01%) to 95.249% when pulling **0580fe794d27bfaccb0bd0159b2e633a9fc32384 on JiangYongKang:master** into **415eb9ebb755cea4753d6191b166b88192de5b41 on apache:master**.



---