Skip to content

Commit

Permalink
Merge branch '2.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 3, 2023
2 parents c6f3e83 + 758b700 commit e1fcbd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package tools.jackson.module.afterburner;

import tools.jackson.core.Version;

import tools.jackson.databind.JacksonModule;
import tools.jackson.databind.util.NativeImageUtil;

import tools.jackson.module.afterburner.deser.ABDeserializerModifier;
import tools.jackson.module.afterburner.ser.ABSerializerModifier;

public class AfterburnerModule extends JacksonModule
implements java.io.Serializable
{
// 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 @@ -53,7 +51,8 @@ public AfterburnerModule() { }
@Override
public void setupModule(SetupContext context)
{
if (RUNNING_IN_SVM)
// [modules-base#191] Since 2.16, Native image detection
if (NativeImageUtil.isInNativeImage())
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
import java.util.function.Supplier;

import tools.jackson.core.Version;

import tools.jackson.databind.JacksonModule;
import tools.jackson.databind.util.NativeImageUtil;

import tools.jackson.module.blackbird.deser.BBDeserializerModifier;
import tools.jackson.module.blackbird.ser.BBSerializerModifier;

public class BlackbirdModule extends JacksonModule
{
// 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 @@ -37,7 +38,8 @@ public BlackbirdModule(Supplier<MethodHandles.Lookup> lookup) {
@Override
public void setupModule(SetupContext context)
{
if (RUNNING_IN_SVM)
// [modules-base#191] Since 2.16, Native image detection
if (NativeImageUtil.isInNativeImage())
{
return;
}
Expand Down

0 comments on commit e1fcbd8

Please sign in to comment.