-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Hello,
I have face this warning while using modelmapper 3.2.4.
And I noticed they depend on your package
The root cause:
src/main/java/net/jodah/typetools/TypeResolver.java (line: 110)
Field implLookupField = MethodHandles.Lookup.class.getDeclaredField("IMPL_LOOKUP");
long implLookupFieldOffset = unsafe.staticFieldOffset(implLookupField);
Object lookupStaticFieldBase = unsafe.staticFieldBase(implLookupField);
MethodHandles.Lookup implLookup = (MethodHandles.Lookup) unsafe.getObject(lookupStaticFieldBase, implLookupFieldOffset);The suggested solution which works java v9^
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.reflect.Field;
Field implLookupField = MethodHandles.Lookup.class.getDeclaredField("IMPL_LOOKUP");
VarHandle implLookupHandle = MethodHandles.privateLookupIn(MethodHandles.Lookup.class, MethodHandles.lookup())
.findVarHandle(MethodHandles.Lookup.class, "IMPL_LOOKUP", MethodHandles.Lookup.class);
MethodHandles.Lookup implLookup = (MethodHandles.Lookup) implLookupHandle.get();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels