Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete substitution for kafka snappy #16798

Merged
merged 1 commit into from
Apr 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static org.apache.kafka.common.record.CompressionType.GZIP;
import static org.apache.kafka.common.record.CompressionType.NONE;

import java.lang.invoke.MethodHandle;
import java.util.List;
import java.util.Map;
import java.util.function.BooleanSupplier;
Expand All @@ -15,8 +14,6 @@
import org.apache.kafka.common.utils.AppInfoParser;
import org.graalvm.home.Version;

import com.oracle.svm.core.annotate.Alias;
import com.oracle.svm.core.annotate.RecomputeFieldValue;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;

Expand All @@ -26,19 +23,6 @@
* * Remove JMX
*/

@TargetClass(value = CompressionType.class, innerClass = "SnappyConstructors", onlyWith = GraalVM20OrEarlier.class)
final class SubstituteSnappy {

@Alias
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
static MethodHandle INPUT = null;

@Alias
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
static MethodHandle OUTPUT = null;

}

final class GraalVM20OrEarlier implements BooleanSupplier {

@Override
Expand All @@ -48,7 +32,7 @@ public boolean getAsBoolean() {
}

@TargetClass(value = CompressionType.class, onlyWith = GraalVM20OrEarlier.class)
final class FixEnumAccess {
final class SubstituteSnappy {

@Substitute
public static CompressionType forName(String name) {
Expand Down