fix: properly handle wrapper function
This commit is contained in:
parent
f1932914ee
commit
6c57e0e9f2
@ -70,8 +70,7 @@ public class Values {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T wrapper(Object val, Class<T> clazz) {
|
||||
if (!isWrapper(val)) return null;
|
||||
|
||||
if (!isWrapper(val)) val = new NativeWrapper(val);
|
||||
var res = (NativeWrapper)val;
|
||||
if (res != null && clazz.isInstance(res.wrapped)) return (T)res.wrapped;
|
||||
else return null;
|
||||
|
Loading…
Reference in New Issue
Block a user