Fixed hundreds of small issues, code improvements, typos, ...
This commit is contained in:
@@ -122,9 +122,11 @@ public final class ReflectField<T> extends ReflectMember<T, String, Field, NoSuc
|
||||
// if the field is final, we have to do some unsafe stuff :/
|
||||
if (sunMiscUnsafeInstance != null) { // Java >= 16
|
||||
// set the value of the field, directly in the memory
|
||||
@SuppressWarnings("deprecation") // no other options yet. VarHandle blocks edition of final fields
|
||||
Object unsafeObjInstance = Modifier.isStatic(realModifiers)
|
||||
? sunMiscUnsafeInstance.staticFieldBase(f)
|
||||
: instance;
|
||||
@SuppressWarnings("deprecation") // no other options yet. VarHandle blocks edition of final fields
|
||||
long offset = Modifier.isStatic(realModifiers)
|
||||
? sunMiscUnsafeInstance.staticFieldOffset(f)
|
||||
: sunMiscUnsafeInstance.objectFieldOffset(f);
|
||||
|
@@ -39,7 +39,7 @@ public class ReflectListWrapper<W extends ReflectWrapperI> extends MappedListVie
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof List l && backend.equals(l instanceof ReflectListWrapper<?> rw ? rw.backend : l);
|
||||
return o instanceof List<?> l && backend.equals(l instanceof ReflectListWrapper<?> rw ? rw.backend : l);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -16,11 +16,6 @@ public abstract class ReflectWrapperTyped<T> extends ReflectWrapper implements R
|
||||
super(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends T> __getRuntimeClass() {
|
||||
return ReflectWrapperTypedI.super.__getRuntimeClass();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public T __getRuntimeInstance() {
|
||||
|
Reference in New Issue
Block a user