Skip to content

Commit ab8af24

Browse files
authored
Merge pull request #1005 from rabbitmq/client-fixes
Miscellaneous client fixes and improvements
2 parents 8fd6835 + d2d2273 commit ab8af24

7 files changed

Lines changed: 513 additions & 585 deletions

File tree

src/main/java/com/rabbitmq/stream/compression/Compression.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020-2025 Broadcom. All Rights Reserved.
1+
// Copyright (c) 2020-2026 Broadcom. All Rights Reserved.
22
// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
33
//
44
// This software, the RabbitMQ Stream Java client library, is dual-licensed under the
@@ -31,6 +31,9 @@ public enum Compression {
3131
}
3232

3333
public static Compression get(byte code) {
34+
if (code < 0 || code >= COMPRESSIONS.length) {
35+
throw new IllegalArgumentException("Unknown compression code: " + code);
36+
}
3437
return COMPRESSIONS[code];
3538
}
3639

0 commit comments

Comments
 (0)