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

Commit

Permalink
chore(YouTube): Only debug log if protobufBuffer has no array
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Nov 18, 2023
1 parent 781cdf8 commit 58afcec
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,13 @@ public static boolean filter(@Nullable String lithoIdentifier, @NonNull StringBu
return false;

ByteBuffer protobufBuffer = bufferThreadLocal.get();
if (protobufBuffer == null || !protobufBuffer.hasArray()) {
LogHelper.printException(() -> "Proto buffer is null or has no array"); // Should never happen.
if (protobufBuffer == null) {
LogHelper.printException(() -> "Proto buffer is null"); // Should never happen.
return false;
}

if (!protobufBuffer.hasArray()) {
LogHelper.printDebug(() -> "Proto buffer does not have an array");
return false;
}

Expand Down

0 comments on commit 58afcec

Please sign in to comment.