Skip to content

Commit

Permalink
JAVA-3045: Fix GraalVM native image support for GraalVM 22.2 (#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
absurdfarce authored Nov 15, 2022
1 parent f9ced72 commit a40bbc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.datastax.oss.driver.api.core.context.DriverContext;
import com.datastax.oss.driver.internal.core.util.GraalDependencyChecker;
import com.datastax.oss.protocol.internal.Compressor;
import com.oracle.svm.core.annotate.Delete;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import io.netty.buffer.ByteBuf;
Expand Down Expand Up @@ -82,14 +81,6 @@ public static Compressor<ByteBuf> newInstance(String name, DriverContext context
}
}

@TargetClass(value = Lz4Compressor.class, onlyWith = Lz4Missing.class)
@Delete
public static final class DeleteLz4Compressor {}

@TargetClass(value = SnappyCompressor.class)
@Delete
public static final class DeleteSnappyCompressor {}

public static class Lz4Present implements BooleanSupplier {
@Override
public boolean getAsBoolean() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/
package com.datastax.oss.driver.internal.core.util;

import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
* A set of driver optional dependencies and a common mechanism to test the presence of such
Expand Down Expand Up @@ -48,10 +50,10 @@ public enum Dependency {
;

@SuppressWarnings("ImmutableEnumChecker")
private final ImmutableList<String> clzs;
private final List<String> clzs;

Dependency(String... classNames) {
clzs = ImmutableList.copyOf(classNames);
clzs = Collections.unmodifiableList(Arrays.asList(classNames));
}

public Iterable<String> classes() {
Expand Down

0 comments on commit a40bbc2

Please sign in to comment.