You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by ham1 <gi...@git.apache.org> on 2017/11/13 00:40:07 UTC

[GitHub] jmeter pull request #327: Utilising more modern Java, simplifying code and f...

GitHub user ham1 opened a pull request:

    https://github.com/apache/jmeter/pull/327

    Utilising more modern Java, simplifying code and formatting code and comments

    ## Description
    Three commits covering three types of change:
    - Formatting and comment tidy up
    - Use modern Java, streams, computeIfAbsent etc.
    - Simplify code and reduce nesting
    
    Feel free to take only some, I did this while trying to better understand the code.
    
    ## Motivation and Context
    Improve readability etc.
    
    ## How Has This Been Tested?
    Ant test, no functional changes.
    
    ## Screenshots (if appropriate):
    
    ## Types of changes
    <!--- What types of changes does your code introduce? Delete as appropriate -->
    - Code improvement
    
    ## Checklist:
    <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
    <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
    - [x] My code follows the [code style][style-guide] of this project.
    - [x] I have updated the documentation accordingly.
    
    [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


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

    $ git pull https://github.com/ham1/jmeter formatting_whitespace_etc

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

    https://github.com/apache/jmeter/pull/327.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 #327
    
----
commit c12f08f74e83e8959f83792f70cfe8c1500f5a7a
Author: Graham Russell <gr...@ham1.co.uk>
Date:   2017-11-11T23:59:10Z

    formatting and comment tidy

commit 0274d4139e05bdaf6884790839f4748f253b3bdb
Author: Graham Russell <gr...@ham1.co.uk>
Date:   2017-11-12T23:07:44Z

    Used modern Java features e.g. streams, computeIfAbsent and enhanced for loops.

commit e1c0dca060d22fe52e657b94c21fb1758741b648
Author: Graham Russell <gr...@ham1.co.uk>
Date:   2017-11-12T23:33:12Z

    Simplify code and reduce nesting

----


---

[GitHub] jmeter pull request #327: Utilising more modern Java, simplifying code and f...

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

    https://github.com/apache/jmeter/pull/327


---

[GitHub] jmeter issue #327: Utilising more modern Java, simplifying code and formatti...

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

    https://github.com/apache/jmeter/pull/327
  
    # [Codecov](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=h1) Report
    > Merging [#327](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=desc) into [trunk](https://codecov.io/gh/apache/jmeter/commit/8151d7947b40385357fda1d7d00578e3932265b7?src=pr&el=desc) will **increase** coverage by `0.02%`.
    > The diff coverage is `20.32%`.
    
    [![Impacted file tree graph](https://codecov.io/gh/apache/jmeter/pull/327/graphs/tree.svg?token=6Q7CI1wFSh&src=pr&width=650&height=150)](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree)
    
    ```diff
    @@             Coverage Diff              @@
    ##              trunk     #327      +/-   ##
    ============================================
    + Coverage     57.74%   57.77%   +0.02%     
    + Complexity     9911     9907       -4     
    ============================================
      Files          1139     1139              
      Lines         73082    73031      -51     
      Branches       7307     7279      -28     
    ============================================
    - Hits          42201    42191      -10     
    + Misses        28412    28368      -44     
    - Partials       2469     2472       +3
    ```
    
    
    | [Impacted Files](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
    |---|---|---|---|
    | [src/core/org/apache/jmeter/gui/GUIFactory.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL0dVSUZhY3RvcnkuamF2YQ==) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
    | [...core/org/apache/jmeter/gui/SimpleCompoundEdit.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL1NpbXBsZUNvbXBvdW5kRWRpdC5qYXZh) | `33.33% <ø> (ø)` | `1 <0> (ø)` | :arrow_down: |
    | [src/core/org/apache/jmeter/gui/CommentPanel.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL0NvbW1lbnRQYW5lbC5qYXZh) | `100% <ø> (ø)` | `5 <0> (ø)` | :arrow_down: |
    | [...rc/core/org/apache/jmeter/gui/UndoHistoryItem.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL1VuZG9IaXN0b3J5SXRlbS5qYXZh) | `57.14% <ø> (ø)` | `2 <0> (ø)` | :arrow_down: |
    | [src/core/org/apache/jmeter/gui/action/Move.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL2FjdGlvbi9Nb3ZlLmphdmE=) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
    | [...core/org/apache/jmeter/gui/SavePropertyDialog.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL1NhdmVQcm9wZXJ0eURpYWxvZy5qYXZh) | `4% <ø> (ø)` | `1 <0> (ø)` | :arrow_down: |
    | [...core/org/apache/jmeter/gui/GlobalUndoableEdit.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL0dsb2JhbFVuZG9hYmxlRWRpdC5qYXZh) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
    | [...ore/org/apache/jmeter/gui/action/AboutCommand.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL2FjdGlvbi9BYm91dENvbW1hbmQuamF2YQ==) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
    | [...ore/org/apache/jmeter/gui/action/ActionRouter.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL2FjdGlvbi9BY3Rpb25Sb3V0ZXIuamF2YQ==) | `6.61% <0%> (+0.18%)` | `3 <0> (ø)` | :arrow_down: |
    | [...re/org/apache/jmeter/gui/action/RevertProject.java](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvZ3VpL2FjdGlvbi9SZXZlcnRQcm9qZWN0LmphdmE=) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
    | ... and [22 more](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=tree-more) | |
    
    ------
    
    [Continue to review full report at Codecov](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=continue).
    > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
    > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
    > Powered by [Codecov](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=footer). Last update [8151d79...e1c0dca](https://codecov.io/gh/apache/jmeter/pull/327?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).



---