mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-17 22:41:18 +01:00
Fixed: Allow Object class object to be passed to ReflectionUtils.invokeField()
This commit is contained in:
parent
c81d9c3346
commit
89a08ff01a
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ public class ReflectionUtils {
|
||||||
* {@link Object} value.
|
* {@link Object} value.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public static <T> FieldInvokeResult invokeField(@NonNull Class<T> clazz, @NonNull String fieldName, T object) {
|
public static <T> FieldInvokeResult invokeField(@NonNull Class<? extends T> clazz, @NonNull String fieldName, T object) {
|
||||||
try {
|
try {
|
||||||
Field field = getDeclaredField(clazz, fieldName);
|
Field field = getDeclaredField(clazz, fieldName);
|
||||||
if (field == null) return new FieldInvokeResult(false, null);
|
if (field == null) return new FieldInvokeResult(false, null);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue