Skip to content

Commit 082f7bb

Browse files
cravaniFokko
andauthored
Update parquet-format-structures/src/main/java/org/apache/parquet/format/Util.java
Co-authored-by: Fokko Driesprong <[email protected]>
1 parent d836005 commit 082f7bb

File tree

1 file changed

+2
-2
lines changed
  • parquet-format-structures/src/main/java/org/apache/parquet/format

1 file changed

+2
-2
lines changed

parquet-format-structures/src/main/java/org/apache/parquet/format/Util.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ private static InterningProtocol protocol(TIOStreamTransport t, int configuredMa
417417
// Set to default 100 MB
418418
maxMessageSize = DEFAULT_MAX_MESSAGE_SIZE;
419419
}
420-
if (configuredMaxMessageSize < -1 || configuredMaxMessageSize == 0) {
421-
throw new NumberFormatException("Invalid max message size: " + configuredMaxMessageSize);
420+
if (configuredMaxMessageSize <= 0) {
421+
throw new NumberFormatException("Max message size must be positive: " + configuredMaxMessageSize);
422422
}
423423

424424
TConfiguration config = t.getConfiguration();

0 commit comments

Comments
 (0)