diff --git a/lib/java/src/main/java/org/apache/thrift/server/TSaslNonblockingServer.java b/lib/java/src/main/java/org/apache/thrift/server/TSaslNonblockingServer.java index d8274fd3ca..bdada2c722 100644 --- a/lib/java/src/main/java/org/apache/thrift/server/TSaslNonblockingServer.java +++ b/lib/java/src/main/java/org/apache/thrift/server/TSaslNonblockingServer.java @@ -308,9 +308,9 @@ private void closeAfterFailure(Throwable failure, Runnable closeConnection) { /** * Logs a failure without letting the logging itself end this thread: building the message and - * rendering the throwable both allocate, which under memory pressure can raise another error, so - * everything that allocates stays inside the guard. ThreadDeath and other virtual machine errors - * are still allowed through. + * rendering the throwable both allocate, which under memory pressure can raise another error, + * so everything that allocates stays inside the guard. ThreadDeath and other virtual machine + * errors are still allowed through. */ private void logFailure(String message, Throwable failure) { try { diff --git a/lib/php/lib/Transport/TTransport.php b/lib/php/lib/Transport/TTransport.php index ddbd192533..8d174e5020 100644 --- a/lib/php/lib/Transport/TTransport.php +++ b/lib/php/lib/Transport/TTransport.php @@ -73,7 +73,7 @@ public function decrementRecursionDepth(): void public function checkStringSize(int $len): void { $max = TProtocol::DEFAULT_MAX_STRING_SIZE; - if ($max > 0 && $len > $max) { + if ($len > $max) { throw new TProtocolException( "String size ($len) larger than the maximum ($max)", TProtocolException::SIZE_LIMIT