Skip to content

Commit

Permalink
Merge pull request #4291 from stuartwdouglas/field-replacement
Browse files Browse the repository at this point in the history
Fixes #4218
  • Loading branch information
stuartwdouglas authored Oct 1, 2019
2 parents 82fe270 + abd7f2c commit 241fd6e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import java.lang.reflect.AnnotatedType;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.function.BooleanSupplier;

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

@TargetClass(Field.class)
@TargetClass(value = Field.class, onlyWith = GraalVersion19_2.class)
final class FieldReplacement {

@Alias
Expand Down Expand Up @@ -53,3 +54,10 @@ public Annotation[] getDeclaredAnnotations() {
}

}

final class GraalVersion19_2 implements BooleanSupplier {
public boolean getAsBoolean() {
final String version = System.getProperty("org.graalvm.version");
return version.startsWith("19.2.");
}
}

0 comments on commit 241fd6e

Please sign in to comment.