GitHub user ham1 opened a pull request: https://github.com/apache/jmeter/pull/324
Save backup refactor Further refactoring for readability to `createBackupFile` and other minor improvements. ## Description Refactoring `createBackupFile` and minor tidy up of surrounding code. I've got a bit carried away but tried to commit often so that at least some of the changes can be easily reviewed and applied. ## Motivation and Context The aim is to improve readability and thus make fixing, testing and improving easier. ## How Has This Been Tested? Manually with both backup settings set. Unit testing is still not very easy. ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Code improvement - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## 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 of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ham1/jmeter save_backup_refactor Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jmeter/pull/324.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 #324 ---- commit ccf7d0b503c0f1fc53952d36e1e01b9cec089aa4 Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T12:26:07Z removed unused import commit 0b1c073a17df6081c87dbc09914345d9a414a987 Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T12:27:29Z refactored checkAcceptableForTestFragment for readability commit 29ac2638fc93c3536b79c9debc8b7cd777d75dc1 Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T12:31:30Z whitespace, strings and comment tidy up commit 4e13847b4008b6b3b93873107411f005ab7db0e2 Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T15:21:58Z utilised LastModifiedFileComparator commit 1f4dd8d337fa7532532e4dd8123cc217081a2472 Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T16:43:51Z whitespace etc for readability commit 863f3566d293f196ed75d8057de93febe85e5e1f Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T16:48:05Z Moved code to deal with files to delete to separate method commit a7523a178f84293dbb871cedf74e73390e1a9ff7 Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T17:29:45Z Removed redundant try, catch and use more concise syntax commit 9eeac9070229eaead36ede36e7d9e5e72f1b82ad Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T19:40:17Z removed predicate method commit 487cc43ec66d492ab32f157a9fb0fc1c2e64aa5c Author: Graham Russell <gra...@ham1.co.uk> Date: 2017-11-09T19:40:52Z further decomposed backupFilesToDelete ---- ---