Fixed hundreds of small issues, code improvements, typos, ...

This commit is contained in:
2025-01-16 00:25:23 +01:00
parent ace34fc0e8
commit 0ffe3198e6
44 changed files with 331 additions and 351 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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() {