Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
refactor: use containsAny helper method (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
OxrxL authored Jun 27, 2022
1 parent 9b1dce4 commit d9268bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static boolean containsAd(String value, ByteBuffer buffer) {

bufferBlockList.add("YouTube Movies");
}
if ((value.contains("home_video_with_context") || value.contains("related_video_with_context")) &&
if (containsAny(value, "home_video_with_context", "related_video_with_context") &&
bufferBlockList.stream().anyMatch(StandardCharsets.UTF_8.decode(buffer).toString()::contains)
) return true;

Expand Down

0 comments on commit d9268bc

Please sign in to comment.