dweiss commented on a change in pull request #1824:
URL: https://github.com/apache/lucene-solr/pull/1824#discussion_r482922248
##########
File path:
lucene/core/src/java/org/apache/lucene/codecs/lucene87/DeflateWithPresetDictCompressionMode.java
##########
@@ -155,16 +155,15 @@ public Decompressor clone() {
private static class DeflateWithPresetDictCompressor extends Compressor {
- final byte[] dictBytes;
- final int blockLength;
+ private final int dictLength, blockLength;
final Deflater compressor;
byte[] compressed;
boolean closed;
DeflateWithPresetDictCompressor(int level, int dictLength, int
blockLength) {
- compressor = new Deflater(level, true);
Review comment:
Just a thought, really.
If it's a bug that can be probed for (and it can be - see Adrian's repro)
then it could as well be a static initialization of a supplier of Deflater
instances; if we probe for a buggy JVM, we return the wrapper. If we don't we
return the Deflater. This way on non-affected JVMs nothing happens and if we do
use the wrapper, we know the JVM is broken.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]