Update CheckIfStringContainsInvalidEncodedCharactersUnitTest.java (#15703)

Update:
assertTrue(found ? true : false);
to
assertTrue(found);
and 
assertTrue(matcher.find() ? true : false);
to
assertTrue(matcher.find());
This commit is contained in:
Mo Helmy 2024-01-22 20:18:56 +02:00 committed by GitHub
parent f6806580ae
commit 2b82e913a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public class CheckIfStringContainsInvalidEncodedCharactersUnitTest {
String regexPattern = "[^\\x00-\\x7F]+";
Pattern pattern = Pattern.compile(regexPattern);
Matcher matcher = pattern.matcher(input);
assertTrue(matcher.find() ? true : false);
assertTrue(matcher.find());
}
@Test
@ -28,6 +28,6 @@ public class CheckIfStringContainsInvalidEncodedCharactersUnitTest {
for (byte b : bytes) {
found = (b & 0xFF) > 127 ? true : found;
}
assertTrue(found ? true : false);
assertTrue(found);
}
}