Skip to content

Commit

Permalink
Not the check not static
Browse files Browse the repository at this point in the history
  • Loading branch information
JooHyukKim committed Aug 1, 2023
1 parent f31d424 commit bfcafc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
public class AfterburnerModule extends Module
implements java.io.Serializable // is this necessary?
{
/**
* <a href="https://github.com/FasterXML/jackson-modules-base/issues/191">[modules-base#191] Native image detection</a>
*
* @since 2.16
*/
private static final boolean RUNNING_IN_SVM = NativeImageUtil.isRunningInNativeImage();

private static final long serialVersionUID = 1L;

/*
Expand Down Expand Up @@ -57,7 +50,8 @@ public AfterburnerModule() { }
@Override
public void setupModule(SetupContext context)
{
if (RUNNING_IN_SVM)
// [modules-base#191] Since 2.16, Native image detection
if (NativeImageUtil.isRunningInNativeImage())
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@

public class BlackbirdModule extends Module
{
/**
* <a href="https://github.com/FasterXML/jackson-modules-base/issues/191">[modules-base#191] Native image detection</a>
*
* @since 2.16
*/
private static final boolean RUNNING_IN_SVM = NativeImageUtil.isRunningInNativeImage();

private Function<Class<?>, Lookup> _lookups;

public BlackbirdModule() {
Expand All @@ -43,7 +36,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.isRunningInNativeImage())
{
return;
}
Expand Down

0 comments on commit bfcafc4

Please sign in to comment.