SampathKumarAmex opened a new pull request #689:
URL: https://github.com/apache/jmeter/pull/689
## Description
- Removed the string concatenation from logger statement which has the
placeholder
- `start` doesn't need to be initialised outside. IDE was showing warning
for this. So, removed the variable declaration and used it inline
## Motivation and Context
- Fixing a minor issue in logging (i.e. using `{}` and concatenation
together)
- Fixed the warning on variable declaration
## How Has This Been Tested?
n/a
Note:-
I can add unit test for `log` statement using external dependency
[LogCaptor](https://github.com/Hakky54/log-captor). Please leave the preference
in comment. I will add the below test in the separate PR. Thanks!
```
@Test
public void testStringFromFileConstructorLogger() {
LogCaptor logCaptor = LogCaptor.forClass(StringFromFile.class);
new StringFromFile();
assertThat(logCaptor.getDebugLogs().get(0),
containsString("++++++++ Construct
org.apache.jmeter.functions.StringFromFile@"));
}
```
## Screenshots (if appropriate):
## Types of changes
<!--- What types of changes does your code introduce? Delete as appropriate
-->
- Bug fix (non-breaking change which fixes an issue)
## 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.
- [ ] I have updated the documentation accordingly.
[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]