Skip to content

Commit

Permalink
Merge pull request #17604 from gsmet/brotli-dce
Browse files Browse the repository at this point in the history
Do not delete BrotliDecoder and let GraalVM DCE do it for us
  • Loading branch information
gsmet authored Jun 2, 2021
2 parents ab89069 + 919b71c commit 565d3f6
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import javax.net.ssl.TrustManagerFactory;

import com.oracle.svm.core.annotate.Alias;
import com.oracle.svm.core.annotate.Delete;
import com.oracle.svm.core.annotate.RecomputeFieldValue;
import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind;
import com.oracle.svm.core.annotate.Substitute;
Expand Down Expand Up @@ -536,11 +535,15 @@ public long memoryAddress() {

}

@TargetClass(className = "io.netty.handler.codec.compression.BrotliDecoder")
@Delete
final class Target_BrotliDecoder {

}
// We need to delete this class but we let GraalVM dead code elimination do it for us.
// Otherwise it causes a problem when --report-unsupported-elements-at-runtime is enabled:
// when trying to delete the class, GraalVM throws a java.lang.NoClassDefFoundError: Lcom/aayushatharva/brotli4j/decoder/DecoderJNI$Wrapper;
// While we recommend not using this option, some extensions out there are using it.
//@TargetClass(className = "io.netty.handler.codec.compression.BrotliDecoder")
//@Delete
//final class Target_BrotliDecoder {
//
//}

@TargetClass(className = "io.netty.handler.codec.http.HttpContentDecompressor")
final class Target_io_netty_handler_codec_http_HttpContentDecompressor {
Expand Down

0 comments on commit 565d3f6

Please sign in to comment.