Skip to content

Commit 4736ead

Browse files
committed
ref(logging): improve sample validation logic for clarity
Signed-off-by: Johnny Hujol <itudoben@users.noreply.github.com>
1 parent b4dbc11 commit 4736ead

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/github/delirius325/jmeter/backendlistener/elasticsearch/ElasticsearchBackendClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,13 @@ private void checkTestMode(String mode) {
309309
*
310310
* @param context The Backend Listener's context
311311
* @param sr The current SampleResult
312-
* @return true or false depending on whether or not the sample is valid
312+
* @return true or false depending on whether the sample is valid
313313
*/
314314
private boolean validateSample(BackendListenerContext context, SampleResult sr) {
315315
boolean valid = true;
316316
String sampleLabel = sr.getSampleLabel().toLowerCase().trim();
317317

318-
if (this.filters.size() > 0) {
318+
if (!this.filters.isEmpty()) {
319319
for (String filter : filters) {
320320
Pattern pattern = Pattern.compile(filter);
321321
Matcher matcher = pattern.matcher(sampleLabel);

0 commit comments

Comments
 (0)