Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: BenWhitehead <[email protected]>
  • Loading branch information
JesseLovelace and BenWhitehead authored Apr 10, 2024
1 parent f137bc1 commit 4ffd639
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ public void close() throws IOException {
}
}

static class ZeroCopyReadinessChecker {
static final class ZeroCopyReadinessChecker {
private static final boolean isZeroCopyReady;

static {
Expand All @@ -1021,7 +1021,7 @@ static class ZeroCopyReadinessChecker {
Class<?> detachableClass = Class.forName(detachableClassName);
detachableClassExists = (detachableClass != null);
} catch (ClassNotFoundException ex) {
// Should cause false to be returned
// leaves detachableClassExists false
}
// Check whether com.google.protobuf.UnsafeByteOperations exists?
boolean unsafeByteOperationsClassExists = false;
Expand All @@ -1034,7 +1034,7 @@ static class ZeroCopyReadinessChecker {
Class<?> unsafeByteOperationsClass = Class.forName(unsafeByteOperationsClassName);
unsafeByteOperationsClassExists = (unsafeByteOperationsClass != null);
} catch (ClassNotFoundException ex) {
// Should cause false to be returned
// leaves unsafeByteOperationsClassExists false
}
isZeroCopyReady = detachableClassExists && unsafeByteOperationsClassExists;
}
Expand Down

0 comments on commit 4ffd639

Please sign in to comment.