Skip to content
Merged
Show file tree
Hide file tree
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 @@ -8,6 +8,8 @@
public class AfterburnerModule extends Module
implements java.io.Serializable // is this necessary?
{
// TODO: replace with jackson-databind/NativeImageUtil.RUNNING_IN_SVM
private static final boolean RUNNING_IN_SVM = System.getProperty("org.graalvm.nativeimage.imagecode") != null;
private static final long serialVersionUID = 1L;

/*
Expand Down Expand Up @@ -49,6 +51,10 @@ public AfterburnerModule() { }
@Override
public void setupModule(SetupContext context)
{
if (RUNNING_IN_SVM)
{
return;
}
ClassLoader cl = _cfgUseValueClassLoader ? null : getClass().getClassLoader();
context.addBeanDeserializerModifier(new DeserializerModifier(cl,
_cfgUseOptimizedBeanDeserializer));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

public class BlackbirdModule extends Module
{
// TODO: replace with jackson-databind/NativeImageUtil.RUNNING_IN_SVM
private static final boolean RUNNING_IN_SVM = System.getProperty("org.graalvm.nativeimage.imagecode") != null;
private Function<Class<?>, Lookup> _lookups;

public BlackbirdModule() {
Expand All @@ -35,6 +37,10 @@ public BlackbirdModule(Supplier<MethodHandles.Lookup> lookup) {
@Override
public void setupModule(SetupContext context)
{
if (RUNNING_IN_SVM)
{
return;
}
CrossLoaderAccess openSesame = new CrossLoaderAccess();
context.addBeanDeserializerModifier(new BBDeserializerModifier(_lookups, openSesame));
context.addBeanSerializerModifier(new BBSerializerModifier(_lookups, openSesame));
Expand Down