This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push: new 57e7dcdbd5 Disallow null options in CompressionConfigurer (#5583) 57e7dcdbd5 is described below commit 57e7dcdbd51c5b843564775dbaa9a0f1d8fa598c Author: Keith Turner <ktur...@apache.org> AuthorDate: Wed May 28 10:58:13 2025 -0400 Disallow null options in CompressionConfigurer (#5583) CompressionConfigurer.override() would throw an NPE if its options were set to null. Changed CompressionConfigurer.init() to disallow null options to provide a better error message. --- .../core/client/admin/compaction/CompressionConfigurer.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/CompressionConfigurer.java b/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/CompressionConfigurer.java index d68601d101..b45e2d6369 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/CompressionConfigurer.java +++ b/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/CompressionConfigurer.java @@ -66,11 +66,10 @@ public class CompressionConfigurer implements CompactionConfigurer { if (largeThresh != null && largeCompress != null) { this.largeThresh = ConfigurationTypeHelper.getFixedMemoryAsBytes(largeThresh); this.largeCompress = largeCompress; - } else if (largeThresh != null ^ largeCompress != null) { - throw new IllegalArgumentException( - "Must set both of " + Property.TABLE_COMPACTION_CONFIGURER_OPTS.getKey() + " (" - + LARGE_FILE_COMPRESSION_TYPE + " and " + LARGE_FILE_COMPRESSION_THRESHOLD - + ") or neither for " + this.getClass().getName()); + } else { + throw new IllegalArgumentException("Must set both of " + + Property.TABLE_COMPACTION_CONFIGURER_OPTS.getKey() + " (" + LARGE_FILE_COMPRESSION_TYPE + + " and " + LARGE_FILE_COMPRESSION_THRESHOLD + ") for " + this.getClass().getName()); } }